The virtual function Pass::runPass is a little deceptive; a pass that isn't a ModulePass can be run on a Module when run from a PassManager, but calling runPass(Module *) with the same pass does nothing. Also, runPass doesn't appear to be used anywhere. Can someone explain what runPass is for? Thanks, Dan
On Mar 7, 2008, at 1:13 PM, Dan Gohman wrote:> The virtual function Pass::runPass is a little deceptive; a pass that > isn't a ModulePass can be run on a Module when run from a > PassManager, but calling runPass(Module *) with the same pass > does nothing. Also, runPass doesn't appear to be used anywhere. > Can someone explain what runPass is for?Only BasicBlockPass uses it. I do not see any advantage of keeping this around ? What are you trying to do? - Devang
On Mar 7, 2008, at 1:22 PM, Devang Patel wrote:> > On Mar 7, 2008, at 1:13 PM, Dan Gohman wrote: > >> The virtual function Pass::runPass is a little deceptive; a pass that >> isn't a ModulePass can be run on a Module when run from a >> PassManager, but calling runPass(Module *) with the same pass >> does nothing. Also, runPass doesn't appear to be used anywhere. >> Can someone explain what runPass is for? > > Only BasicBlockPass uses it. I do not see any advantage of keeping > this around ? What are you trying to do?I'm just reading the code trying to understand what stuff does and how it's used :-). If you don't see any advantage in keeping the runPass methods, can we remove them? Thanks, Dan