[LLVMdev] Choosing Alias Analysis

David Greene dag at cray.com
Fri Aug 10 10:15:28 PDT 2007


On Thursday 09 August 2007 19:21, Chris Lattner wrote:

> Interesting question, I don't have an answer to this.  To make things more
> complicated, you can have multiple instances of an analysis group and may
> want different things at different times:
>
>    -basicaa -licm -something_that_invalidates_aa -andersaa -licm -whatever

Some questions about that:

How does this interact with analysis groups?  When a class is registered as 
part of an analysis group there's a boolean template argument indicating 
whether it is the default pass for the group.  If I say -andersaa on the 
command line (say it's the very first option), does that then make Andersen's
the new default alias analysis so that passes that declare a dependence on
AliasAnalysis will now get Andersen's instead of basicaa?  Or do I really have
to put -andersaa after every option that could invalidate alias analysis?

>From the comments in PassSupport.h, it sounds like the former is true.
Andersen's would be "available" and thus used.

However, what happens when alias analysis information gets invalidated?
Is Andersen's still "available" in the sense analysis groups use it?  

If not, it seems it would be tough to make sure Andersen's is always
used everywhere that AliasAnalysis is asked for because there are passes
llvm runs without any command-line directive and those passes could
invalidate AA.

Or is it sufficient than an Andersen's object is constructed and that that
constitutes "availability?"  What happens if multiple alias analyses are
constructed?  Is the most-recently constructed one considered the "available" 
one?

                                               -Dave




More information about the llvm-dev mailing list