Just noticed that quite a few passes like LoopSimplify are implemented in a single .cpp file ... this makes it impossible to specify LoopSimplify using the "addRequired" method. Was there any particular reason to do it this way? I wouldn't mind doing the splitting myself, though I am not using the CVS versions right now. Also, it would be nice to have support for some sort of a "addPreservedTransitive" method ... so that when a pass uses "setPreservesCFG", other passes such as dominator analysis will be automatically preserved too ... Sameer. -- Research Scholar, KReSIT, IIT Bombay http://www.it.iitb.ac.in/~sameerds/
On Fri, 29 Apr 2005, Sameer D. Sahasrabuddhe wrote:> Just noticed that quite a few passes like LoopSimplify are implemented > in a single .cpp file ... this makes it impossible to specify > LoopSimplify using the "addRequired" method. Was there any particular > reason to do it this way? I wouldn't mind doing the splitting myself, > though I am not using the CVS versions right now.For this, just use: AU.addRequiredID(LoopSimplifyID); "LoopSimplifyID" is a marker that is used to identify the pass, which is exported from the .cpp file.> Also, it would be nice to have support for some sort of a > "addPreservedTransitive" method ... so that when a pass uses > "setPreservesCFG", other passes such as dominator analysis will be > automatically preserved too ...It would be nice, however, if you pass doesn't modify the CFG (even if it uses loop simplify) just say so. If it does, then you will have to explicitly update all of the data structures you want to preserve... -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
On Fri, Apr 29, 2005 at 08:10:17AM -0500, Chris Lattner wrote:> AU.addRequiredID(LoopSimplifyID); > > "LoopSimplifyID" is a marker that is used to identify the pass, which is > exported from the .cpp file.I'll have to declare a PassInfo* called LoopSimplifyID inside namespace llvm, in order for that to compile correctly, right? I was wondering why not simply make it available for AU.addRequired instead. I guess that AU.addRequired will not be sufficient because LoopSimplify is not an analysis that the PassManager can update when some other pass changes the CFG. So the only way for my pass to ensure that the loops are simplified is to explicitly invoke LoopSimplify ... is that correct? Sameer. -- Research Scholar, KReSIT, IIT Bombay http://www.it.iitb.ac.in/~sameerds/