[llvm-commits] [llvm] r48476 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/
Dan Gohman
gohman at apple.com
Tue Mar 18 10:42:01 PDT 2008
On Mar 17, 2008, at 10:14 PM, Chris Lattner wrote:
>
> 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?
We already have passes calling setPreservesAll() in getAnalysisUsage.
Would that cover it? Everything that now returns true for isAnalysis
also already calls setPreservesAll().
Dan
More information about the llvm-commits
mailing list