Displaying 2 results from an estimated 2 matches for "itgep1".
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...F); I != E; ++I)
{
Instruction *Inst = &*I;
if ( GetElementPtrInst *gep = dyn_cast<GetElementPtrInst>(Inst) )
geps.push_back(gep);
}
}
errs() << "List of GEPs:\n";
for(std::list<GetElementPtrInst* >::iterator itGep1
= geps.begin(); itGep1 != geps.end(); itGep1++){
GetElementPtrInst *gep1 = *itGep1;
Type *t1 = ((PointerType *)gep1->getType())->getElementType();
int64_t size1 = TD.getTypeAllocSize(t1);
std::list<GetElementPtrInst* >::iterator itGep2 = itGep...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The
input C code is very simple:
void foo(int *a, int *b)
{
for(int i=0; i<10; i++)
b[i] = a[i]*a[i];
}
int main()
{
int a[10];
int b[10];
for(int i=0; i<10; i++)
a[i] = i;
foo(a,b);
return 0;
}
Obviously, for "foo", it only reads from array "a" and only writes to array