[LLVMdev] alias analysis results
Eli Friedman
eli.friedman at gmail.com
Fri May 15 03:09:51 PDT 2009
On Fri, May 15, 2009 at 1:50 AM, Weihua Sheng <weihua.sheng at gmail.com> wrote:
> the andersens-aa gives out the following results:
> Function: test: 6 pointers, 0 call sites
> NoAlias: i32* %aa, i32** %kk
> NoAlias: i32* %aa, i32** %jj
> NoAlias: i32** %jj, i32** %kk
[snip]
> which I interpret as (%0, %1, %aa, %2) as the alias set. Here comes
> my beginner's question: will the AA give the result that kk and jj
> alias (that's what I understand from C and possibly could see from
> bc)? Thanks a lot again!
"%jj" and "%kk" don't alias... that's trivial, though, because they're
the addresses of distinct stack allocations. If you're talking about
the values loaded from those variables, they are "%0", "%1", and "%2",
and the returned result is that they "MayAlias". A more precise
analysis could return "MustAlias".
-Eli
More information about the llvm-dev
mailing list