[LLVMdev] about AnalysisUsage

Chris Lattner sabre at nondot.org
Fri Apr 29 06:10:17 PDT 2005


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/




More information about the llvm-dev mailing list