[llvm-commits] [llvm] r48476 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/

Chris Lattner clattner at apple.com
Mon Mar 17 22:14:52 PDT 2008


On Mar 17, 2008, at 5:39 PM, Devang Patel wrote:

> Author: dpatel
> Date: Mon Mar 17 19:39:19 2008
> New Revision: 48476
>
> URL: http://llvm.org/viewvc/llvm-project?rev=48476&view=rev
> Log:
> Identify Analysis pass.
> Do not run analysis pass again if analysis info is still available.
> This fixes PR1441.

>
> +  /// isAnalysis - Return true if this pass is  implementing an  
> analysis pass.
> +  virtual bool isAnalysis() const { return true; }

Is there no better way?  If we really need each pass to identify  
itself like this, I'd prefer to either put this into getAnalysisUsage  
(which is really "getPassInfo" or something).  If you don't like that,  
how about making this a bool in Pass, and just having a inline non- 
virtual function that accesses it?

-Chris




More information about the llvm-commits mailing list