Dear All, If I have a ModulePass that requires a FunctionPass, and I include a line like the following: <variable> = &getAnalysis<TheFunctionPass>(*Function); ... will the PassManager blindly re-run the FunctionPass each time the ModulePass requests it, or does it use the Pass dependency information to re-run the FunctionPass only when necessary. -- John T.
On Thu, Mar 19, 2009 at 14:43, John Criswell <criswell at cs.uiuc.edu> wrote:> > If I have a ModulePass that requires a FunctionPass, and I include a > line like the following: > > <variable> = &getAnalysis<TheFunctionPass>(*Function); > > ... will the PassManager blindly re-run the FunctionPass each time the > ModulePass requests it, or does it use the Pass dependency information > to re-run the FunctionPass only when necessary. >Apparently it should use the dependency and preservation information to schedule them efficiently. See http://llvm.org/docs/WritingAnLLVMPass.html#passmanager ~ Scott
On Mar 19, 2009, at 11:43 AM, John Criswell wrote:> Dear All, > > If I have a ModulePass that requires a FunctionPass, and I include a > line like the following: > > <variable> = &getAnalysis<TheFunctionPass>(*Function); > > ... will the PassManager blindly re-run the FunctionPass each time the > ModulePass requests it, or does it use the Pass dependency information > to re-run the FunctionPass only when necessary.Normally the pass manager runs pass only when necessary, but in this special case you mentioned the pass manager will always re-run the function pass. - Devang
Devang Patel wrote:> On Mar 19, 2009, at 11:43 AM, John Criswell wrote: > > >> Dear All, >> >> If I have a ModulePass that requires a FunctionPass, and I include a >> line like the following: >> >> <variable> = &getAnalysis<TheFunctionPass>(*Function); >> >> ... will the PassManager blindly re-run the FunctionPass each time the >> ModulePass requests it, or does it use the Pass dependency information >> to re-run the FunctionPass only when necessary. >> > > Normally the pass manager runs pass only when necessary, but in this > special case you mentioned the pass manager will always re-run the > function pass. >Thanks everyone. This helped clarify things. -- John T.> - > Devang > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >