Are LoopPasses allowed to maintain state between runOnLoop invocations? The documentation is not clear on this point. -Dave
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 ?> > 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(). - Devang
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
Seemingly Similar Threads
- [LLVMdev] LoopPass Question
- [LLVMdev] LoopPass Question
- [LLVMdev] LoopPass doFinalization() called multiple times per program?
- [LLVMdev] LoopPass doFinalization() called multiple times per program?
- [LLVMdev] LoopPass doFinalization() called multiple times per program?