[LLVMdev] Question regarding the alias analysis chaining behaviour

Nick Lewycky nicholas at mxc.ca
Thu Nov 25 13:05:03 PST 2010


Kenneth Uildriks wrote:
> On Wed, Nov 24, 2010 at 2:50 PM, Nick Lewycky<nicholas at mxc.ca>  wrote:
>
>> The AA that you specify will be created when you specify it and live
>> until that pass is invalidated (not explicitly preserved by a pass that
>> runs). The next time a pass requires AA, the pass manager will create
>> the default AA (BasicAA) and not the one you put on the command line.
>>
>
> I thought analysis passes just rebuilt their state after they got
> invalidated.  Shouldn't that happen with an AA pass as well?  Or is AA
> special?

What makes AA special is that it's in an AnalysisGroup. Yes analyses 
will be recreated when required by the running pass, but in this case 
the passes require "anything in the AA group" and by default the 
PassManager will satisfy that by creating BasicAA, not the pass you just 
wrote and stuck in the optz'n list at some point. If you insert an AA 
pass at some point then the pass manager will return that one until it's 
invalidated, but will create BasicAA next time.

Nick



More information about the llvm-dev mailing list