[LLVMdev] Question regarding the alias analysis chaining behaviour

dirac dirac.raj at gmail.com
Wed Nov 24 12:24:20 PST 2010


Hi,
   I am using LLVM 2.4 on a Linux RHEL5 machine. I was trying to figure out
how the chaining of the alias analysis passes works in LLVM. Here are the
command I used to test the chaining part.
 1.  ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc
-no-aa -anders-aa -licm
  Result: Anderson's AA and No Alias Analysis both are called.
  2. ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc
-basicaa -anders-aa -licm
  Result: Anderson's AA and Basic AA both are called.
  3. ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc
-basicaa -licm
  Result: Only Basic AA is called. (When I use -no-aa instead of -basicaa,
only the NoAA is called).
  4. ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc
-basicaa -anders-aa -licm -licm
  Result: First licm gets a mix of both AA passes (basic and anders), second
licm only gets basic.
  5. ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc
-basicaa -anders-aa -licm -basicaa -anders-aa -licm
  Result: Both licm instances get a mix of Anders and Basic AA.

  Am I to conclude that the Anderson's Alias Analysis is only applied to
LICM? and other passes which require alias analysis use BasicAA or NoAA
depending which on which one is specified on the command line? Is this the
reason I am seeing calls to different AAs when although I specify an AA
which neither Basic nor No AA?

  I read on llvm docs that it is not possible to actually specify one
user-created alias analysis on the command line which is applied to all
subsequent passes on the command line. Does this mean that there is a
constraint on the command line user-created AA... which is that it only
applies to the top-level pass (licm above) specified immediately after the
user-created AA?

  I read in the same llvm doc that the "superclass" (The main Alias Analysis
pass I assume) decides which response to use when the user-defined AA
overrides the default methods. However, in my current version, I don't see
code for deciding between the two AAs. Is this an artifact of the older
version I am using?

  Thanks for your response.

Rajesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101124/046f16be/attachment.html>


More information about the llvm-dev mailing list