search for: veswa4

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

Did you mean: vesa
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
...assuming the > intent in the source code was, e.g., to initialize `a` and `b` to `0` > and the pointers `f1` and `f2` to `NULL`, using aggregate initialization > for `s`): > - Clang [-> LLVM-IR]: https://llvm.godbolt.org/z/WT7V3E > - [LLVM-IR ->] opt: https://llvm.godbolt.org/z/Veswa4 > > Alias sets for function 'main': Alias Set Tracker: 1 alias sets for 2 > pointer values. > AliasSet[0x55ec7f9a23e0, 3] may alias, Mod/Ref Pointers: (i8* %0, > LocationSize::precise(4)), (i32* %a, LocationSize::precise(4)) > > Note that in the original source code `...