search for: itgep2

Displaying 2 results from an estimated 2 matches for "itgep2".

Did you mean: itgep1
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...terator 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 = itGep1; for(; itGep2 != geps.end(); itGep2++){ GetElementPtrInst *gep2 = *itGep2; gep1->dump(); errs() << "-->"; gep2->dump(); Type *t2 = ((PointerType *)gep2->getType())->getElementType(); int64_t...
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