[LLVMdev] How to change default AA with opt? (Change default impl for an analysis group with opt?)

Will Dietz willdtz at gmail.com
Thu Jun 24 09:55:46 PDT 2010

Hi all,

I'm working on an AliasAnalysis pass that is loaded as a module.

What I'd like to do is something like:

opt -my-aa -O3

Where -O3 is whatever set of optimizations I'm using, but they all
should use 'my-aa' for their results.

However, what appears to happen is it uses my-aa until something
invalidates those results and then goes back to basic-aa when
something needs AA results again.

Short of running -my-aa -gvn -my-aa -dse -my-aa -licm... etc, is there
a good way to do this?

Having thought about it, it seems less surprising than it did
originally, but perhaps this should be mentioned somewhere?

Thanks for your time,


More information about the llvm-dev mailing list