Displaying 3 results from an estimated 3 matches for "yaw1mb".
2020 Jul 09
2
Understand alias-analysis results
...at seems quite confusing to me..
You can add -print-all-alias-modref-info for more detailed information:
https://llvm.godbolt.org/z/9njGqx -- you'll notice "MustAlias: i32* %c,
i8* %6".
Adding `-evaluate-aa-metadata` for `load` and `store` instructions,
https://llvm.godbolt.org/z/YaW1Mb, you'll notice "MustAlias: %0 = load
i32**, i32*** %a, align 8 <-> store i32** %b, i32*** %a, align 8"
However, from your results we can already note:
AliasSet[0x5584ab7e5d00, 5] may alias, Mod/Ref Pointers: (i32* %c,
LocationSize::precise(4)), (i32** %b, LocationSize:...
2020 Jul 10
2
Understand alias-analysis results
...th pointing to c, right? Am I
> missing anything here?
Correct, both `x` and `b` point to `c` (the pointers themselves are
distinct, but after dereferencing what they point to is the same location).
Consider the slice on the (first call) to `MUSTALIAS(x, &c);`:
https://llvm.godbolt.org/z/YaW1Mb
%a = alloca i32**, align 8
%b = alloca i32*, align 8
%x = alloca i32*, align 8
%c = alloca i32, align 4
. . .
%0 = load i32**, i32*** %a, align 8
%1 = load i32*, i32** %0, align 8
. . .
%4 = load i32*, i32** %x, align 8
%5 = bitcast i32* %4 to i8*
%6 = bitcast i32* %c to i8*
; MUSTALIAS(x, &c)...
2020 Jul 09
2
Understand alias-analysis results
Hey Matt,
That's awesome. Thank you very much for all the information and
clarification! Just a few follow up questions. Could you kindly shed some
lights on it? Thank you!
1. I tried to tweak the code in the following way:
- Clang [-> LLVM-IR]: https://llvm.godbolt.org/z/n9rGrs
- [LLVM-IR ->] opt: https://llvm.godbolt.org/z/Uc6h5Y
And i note that the outputs are:
Alias sets for