[LLVMdev] LoopPass Question
David Greene
dag at cray.com
Tue Aug 19 13:51:31 PDT 2008
On Tuesday 19 August 2008 15:15, Devang Patel wrote:
> On Aug 19, 2008, at 12:32 PM, David Greene wrote:
> > Are LoopPasses allowed to maintain state between runOnLoop
> > invocations?
>
> What kind of information are you looking to maintain between runOnLoop
> invocations ?
Cached analysis answers.
> > The documentation is not clear on this point.
>
> doInitialization() and doFinalization() will be run for each pass
> before and after runOnLoop().
>
> For each pass
> doInitialization()
> For each pass
> runOnLoop()
> For each pass
> doFinalization()
>
> So each pass can collect information during initialization pass to use
> during runOnLoop().
runOnLoop computes some information about basic blocks. I would like
to reuse that information in later runOnLoop invocations. Is the loop pass
created and destroyed for each invocation?
-Dave
More information about the llvm-dev
mailing list