<div class="gmail_quote"><div><div>Hi, LLVM dev team:</div><div><span style="white-space:pre">  </span>Thanks for your suggestion, I have done the experiment to compare the two pointer analysis(Andersen and Steensgaard) methods in LLVM, but the result was unexpected. In each test, I compare these two methods using same optimization; There are several tests, each with a different optimization. The benchmark is all the 11 C programs in CINT2000 of SPEC. In all the tests, I found very little performance difference between Andersen and Steensgaard. Here is an example of the options in one of the tests:</div>

<div><span style="white-space:pre">       </span>  llvmc -opt -Wo,=-O3 -Wo,=-load=path_of_libLLVMDataStructure.so -Wo,=-steens-aa </div><div><span style="white-space:pre">   </span>  llvmc -opt -Wo,=-O3 -Wo,=-anders-aa</div>
<div>the other optimizations are: dead code elimination, dead store elimination, const propogation, O1, etc.</div><div><br></div><div>And now what confusing me are:</div><div>1 Did the optimizations really use the result of Andersen or Steensgaard?</div>

<div>2 It seems both Andersen and Steensgaard have a little trouble to compile some programs, such as: 175.vpr, 176.gcc and 197.parser for Andersen,  253.perlbmk for Steensgaard.</div><div>3 Are the difference between O1 and O3 in LLVM similar with that in gcc?<span style="white-space:pre">      </span>  </div>

<div><br></div><div>Anyone can give me some hints? thanks</div><div><br></div><div>-William.C</div><br>
<div class="gmail_quote">在 2010年3月23日 下午9:59,John Criswell <span dir="ltr"><<a href="mailto:criswell@uiuc.edu" target="_blank">criswell@uiuc.edu</a>></span>写道:<div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>聪明陈 wrote:<br>
> Hi LLVM dev team:<br>
> I am now doing an experiment to comparing Steensgaard-style and<br>
> Andersen-style pointer analysis on LLVM. Since steensgaard pointer<br>
> analysis is in module "poolalloc", so I installed poolalloc release<br>
> 2.6 on my machine(intel X86_64 RedHatEnterpriseLinux 5.1, gcc-4.2.4),<br>
> two directories "include" and "lib" were created after installation<br>
> but no binary files generated.<br>
<br>
</div><div>Generally, we don't use the files created by a "make install." Instead,<br>
we generally just compile the code and use the files directly out of the<br>
Release/bin (or Debug/bin) directories of the LLVM object tree.<br>
<br>
</div><div>> I loaded poolalloc module into opt program according to the poolalloc<br>
> "README" file:<br>
> /opt -load <path to pool allocator> -poolalloc <other opt options>/<br>
> Here's my command:<br>
> *opt -load=/home/cmchen/INSTALL/llvm-common/lib/libpoolalloc_rt.so<br>
> -poolalloc -analyze -print-alias-sets test.bc*<br>
> and here's the error message:<br>
> *opt: Unknown command line argument '-poolalloc' Try: 'opt --help' *<br>
> So, my questions are:<br>
> 1 Did I install the poolalloc module in a wrong way? or I just did not<br>
> completely installed the module?<br>
> 2 How should I load the module correctly? I just use the path of<br>
> poolalloc shared object file to be the <path to pool allocator>, cause<br>
> no binary file has been generated.<br>
> Could you give me some suggestion? Thank you.<br>
<br>
</div><div><div></div><div>There are two problems:<br>
<br>
1) You need to load the library containing DSA first. To do that, you<br>
need to use the -load <path>/libLLVMDataStructure.so option.<br>
<br>
2) I believe you are loading the wrong library. You want to load<br>
libpoolalloc.so and not libpoolalloc_rt.so. The former is the LLVM<br>
poolalloc transform pass; the latter is the run-time library<br>
implementing the poolallocation functions.<br>
<br>
If you're only interested in DSA (for points-to and alias analysis),<br>
then you don't need poolalloc. Just use:<br>
<br>
opt -load <path>/libLLVMDataStructure.so <dsa passes you want to run><br>
<br>
If you want to run poolalloc, then you do the following:<br>
<br>
opt -load <path>/libLLVMDataStructure.so -load <path>/libpoolalloc.so<br>
-poolalloc input.bc -f -o output.bc<br>
<br>
A couple of warnings about the alias analysis passes in DSA:<br>
<br>
1) I believe all the alias analysis implementations are based on DSA.<br>
DSA is a unification-based algorithm, so I think you might see<br>
unification even in non-unification algorithms like Andersons. Andrew,<br>
does this sound correct?<br>
<br>
2) I have not used the alias analysis passes in DSA, so I don't know how<br>
well they work.<br>
<br>
-- John T.<br>
<br>
</div></div></blockquote></div></div></div><br></div>
</div><br>