[LLVMdev] Alias analysis result

Duncan Sands baldrick at free.fr
Wed Sep 19 00:59:20 PDT 2012


Hi Welson,

> In case "my_pass" is compiled into a standalone executable, how can I run the
> specific alias analysis in the code?

I suggest you work out what passing -basic-aa to opt does, how it works, and do
the same in your code.

Ciao, Duncan.

>
> Thanks
>
> On Thu, Mar 8, 2012 at 8:55 AM, Duncan Sands <baldrick at free.fr
> <mailto:baldrick at free.fr>> wrote:
>
>     Hi,
>
>      > That's the reason I have defined getAnalysisUsage method. Isn't that the
>      > right way to do it?
>
>     no, that gives you access to whatever alias analysis has been computed, but
>     it doesn't specify what kind of alias analysis should be computed (there are
>     several).  Try something like this:
>         opt -load=my_pass.so -basic-aa -run_my_pass ...
>     Ciao, Duncan.
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>
> --
> Welson
>
> Phone: (408) 418-8385
> Email: welson.sun at gmail.com <mailto:welson.sun at gmail.com>
>
>




More information about the llvm-dev mailing list