[LLVMdev] about AnalysisUsage

Sameer D. Sahasrabuddhe sameerds at it.iitb.ac.in
Fri Apr 29 06:43:58 PDT 2005

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?

Research Scholar, KReSIT, IIT Bombay

More information about the llvm-dev mailing list