Kenneth Uildriks
2010-Nov-25 19:45 UTC
[LLVMdev] Question regarding the alias analysis chaining behaviour
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?
Anton Korobeynikov
2010-Nov-25 20:57 UTC
[LLVMdev] Question regarding the alias analysis chaining behaviour
> 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?Yes, AA is "somehow" special. This is well known deficiency of pass manager, it will rebuild only default implementation, not all the required stuff in the chain. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Nick Lewycky
2010-Nov-25 21:05 UTC
[LLVMdev] Question regarding the alias analysis chaining behaviour
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
Kenneth Uildriks
2010-Nov-26 20:58 UTC
[LLVMdev] Question regarding the alias analysis chaining behaviour
On Thu, Nov 25, 2010 at 3:05 PM, Nick Lewycky <nicholas at mxc.ca> wrote:> Kenneth Uildriks wrote: >> >> On Wed, Nov 24, 2010 at 2:50 PM, Nick Lewycky<nicholas at mxc.ca> wrote: >> >> 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 >So the trouble is in the way AnalysisGroups are handled, then? Is there a desire or plan to change it so that the pass continues to exist even when it's invalidated and needs to be recomputed?
Reasonably Related Threads
- [LLVMdev] Question regarding the alias analysis chaining behaviour
- [LLVMdev] Question regarding the alias analysis chaining behaviour
- [LLVMdev] Question regarding the alias analysis chaining behaviour
- [LLVMdev] Question regarding the alias analysis chaining behaviour
- [LLVMdev] Question regarding the alias analysis chaining behaviour