search for: idxprom5

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

Did you mean: idxprom
2020 Jul 09
2
Understand alias-analysis results
Hello, I am performing alias analysis toward the following simple code: struct MyStruct { int * f1; int * f2; }; void NOALIAS(void* p, void* q){ } int main() { struct MyStruct s[2]; int a,b; s[0].f1 = &a; s[1].f1 = &b; NOALIAS(s[a].f1, s[b].f2); return 0; } When I use the following command to generate .bc code and conduct alias analysis: clang -c -emit-llvm t.c -O2 opt -basicaa
2020 Jul 09
2
Understand alias-analysis results
...m > %f14 = getelementptr inbounds %struct.MyStruct, %struct.MyStruct* > %arrayidx3, i32 0, i32 0 > %4 = load i32*, i32** %f14, align 16, !tbaa !2 > %5 = bitcast i32* %4 to i8* > > ; the following corresponds to loading `s[b].f2` > %6 = load i32, i32* %b, align 4, !tbaa !7 > %idxprom5 = sext i32 %6 to i64 > %arrayidx6 = getelementptr inbounds [2 x %struct.MyStruct], [2 x > %struct.MyStruct]* %s, i64 0, i64 %idxprom5 > %f2 = getelementptr inbounds %struct.MyStruct, %struct.MyStruct* > %arrayidx6, i32 0, i32 1 > %7 = load i32*, i32** %f2, align 8, !tbaa !9 > %8 =...