[llvm-commits] [llvm] r48520 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/Analysis/IPA/ lib/VMCore/
Devang Patel
dpatel at apple.com
Tue Mar 18 17:48:41 PDT 2008
Author: dpatel
Date: Tue Mar 18 19:48:41 2008
New Revision: 48520
URL: http://llvm.org/viewvc/llvm-project?rev=48520&view=rev
Log:
Do not use virtual function to identify an analysis pass.
Modified:
llvm/trunk/include/llvm/Analysis/Dominators.h
llvm/trunk/include/llvm/Analysis/FindUsedTypes.h
llvm/trunk/include/llvm/Analysis/IntervalPartition.h
llvm/trunk/include/llvm/Analysis/LoopInfo.h
llvm/trunk/include/llvm/Analysis/LoopPass.h
llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
llvm/trunk/include/llvm/Analysis/PostDominators.h
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/include/llvm/CallGraphSCCPass.h
llvm/trunk/include/llvm/Pass.h
llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
llvm/trunk/lib/Analysis/AliasDebugger.cpp
llvm/trunk/lib/Analysis/AliasSetTracker.cpp
llvm/trunk/lib/Analysis/CFGPrinter.cpp
llvm/trunk/lib/Analysis/IPA/Andersens.cpp
llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
llvm/trunk/lib/Analysis/InstCount.cpp
llvm/trunk/lib/Analysis/LoadValueNumbering.cpp
llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
llvm/trunk/lib/VMCore/PassManager.cpp
Modified: llvm/trunk/include/llvm/Analysis/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/Dominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/Dominators.h Tue Mar 18 19:48:41 2008
@@ -300,9 +300,6 @@
// FIXME: Should remove this
virtual bool runOnFunction(Function &F) { return false; }
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual void releaseMemory() { reset(); }
/// getNode - return the (Post)DominatorTree node for the specified basic
@@ -667,7 +664,7 @@
static char ID; // Pass ID, replacement for typeid
DominatorTreeBase<BasicBlock>* DT;
- DominatorTree() : FunctionPass(intptr_t(&ID)) {
+ DominatorTree() : FunctionPass(intptr_t(&ID), true) {
DT = new DominatorTreeBase<BasicBlock>(false);
}
@@ -694,9 +691,6 @@
return DT->getRootNode();
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -843,7 +837,7 @@
public:
DominanceFrontierBase(intptr_t ID, bool isPostDom)
- : FunctionPass(ID), IsPostDominators(isPostDom) {}
+ : FunctionPass(ID, true), IsPostDominators(isPostDom) {}
/// getRoots - Return the root blocks of the current CFG. This may include
/// multiple blocks if we are computing post dominators. For forward
@@ -916,9 +910,6 @@
return Roots[0];
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &) {
Frontiers.clear();
DominatorTree &DT = getAnalysis<DominatorTree>();
Modified: llvm/trunk/include/llvm/Analysis/FindUsedTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/FindUsedTypes.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/FindUsedTypes.h (original)
+++ llvm/trunk/include/llvm/Analysis/FindUsedTypes.h Tue Mar 18 19:48:41 2008
@@ -25,7 +25,7 @@
std::set<const Type *> UsedTypes;
public:
static char ID; // Pass identification, replacement for typeid
- FindUsedTypes() : ModulePass((intptr_t)&ID) {}
+ FindUsedTypes() : ModulePass((intptr_t)&ID, true) {}
/// getTypes - After the pass has been run, return the set containing all of
/// the types used in the module.
@@ -50,10 +50,6 @@
void IncorporateValue(const Value *V);
public:
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
/// run - This incorporates all types used by the specified module
bool runOnModule(Module &M);
Modified: llvm/trunk/include/llvm/Analysis/IntervalPartition.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IntervalPartition.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/IntervalPartition.h (original)
+++ llvm/trunk/include/llvm/Analysis/IntervalPartition.h Tue Mar 18 19:48:41 2008
@@ -47,10 +47,7 @@
public:
static char ID; // Pass identification, replacement for typeid
- IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ IntervalPartition() : FunctionPass((intptr_t)&ID, true), RootInterval(0) {}
// run - Calculate the interval partition for this function
virtual bool runOnFunction(Function &F);
Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Tue Mar 18 19:48:41 2008
@@ -879,7 +879,7 @@
public:
static char ID; // Pass identification, replacement for typeid
- LoopInfo() : FunctionPass(intptr_t(&ID)) {
+ LoopInfo() : FunctionPass(intptr_t(&ID), true) {
LI = new LoopInfoBase<BasicBlock>();
}
@@ -919,9 +919,6 @@
return LI->isLoopHeader(BB);
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- bool isAnalysis() const { return true; }
-
/// runOnFunction - Calculate the natural loop information.
///
virtual bool runOnFunction(Function &F);
Modified: llvm/trunk/include/llvm/Analysis/LoopPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopPass.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopPass.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopPass.h Tue Mar 18 19:48:41 2008
@@ -29,7 +29,7 @@
class LoopPass : public Pass {
public:
- explicit LoopPass(intptr_t pid) : Pass(pid) {}
+ explicit LoopPass(intptr_t pid, bool AP = false) : Pass(pid, AP) {}
// runOnLoop - This method should be implemented by the subclass to perform
// whatever action is necessary for the specfied Loop.
Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Tue Mar 18 19:48:41 2008
@@ -66,10 +66,7 @@
static Instruction* const Dirty;
static char ID; // Class identification, replacement for typeinfo
- MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID, true) {}
/// Pass Implementation stuff. This doesn't do any analysis.
///
Modified: llvm/trunk/include/llvm/Analysis/PostDominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PostDominators.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/PostDominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/PostDominators.h Tue Mar 18 19:48:41 2008
@@ -25,13 +25,10 @@
static char ID; // Pass identification, replacement for typeid
DominatorTreeBase<BasicBlock>* DT;
- PostDominatorTree() : FunctionPass((intptr_t)&ID) {
+ PostDominatorTree() : FunctionPass((intptr_t)&ID, true) {
DT = new DominatorTreeBase<BasicBlock>(true);
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -72,9 +69,6 @@
PostDominanceFrontier()
: DominanceFrontierBase((intptr_t) &ID, true) {}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &) {
Frontiers.clear();
PostDominatorTree &DT = getAnalysis<PostDominatorTree>();
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Tue Mar 18 19:48:41 2008
@@ -192,7 +192,7 @@
void *Impl; // ScalarEvolution uses the pimpl pattern
public:
static char ID; // Pass identification, replacement for typeid
- ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {}
+ ScalarEvolution() : FunctionPass((intptr_t)&ID, true), Impl(0) {}
/// getSCEV - Return a SCEV expression handle for the full generality of the
/// specified expression.
@@ -291,9 +291,6 @@
/// that no dangling references are left around.
void deleteValueFromRecords(Value *V) const;
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
Modified: llvm/trunk/include/llvm/CallGraphSCCPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CallGraphSCCPass.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CallGraphSCCPass.h (original)
+++ llvm/trunk/include/llvm/CallGraphSCCPass.h Tue Mar 18 19:48:41 2008
@@ -31,7 +31,7 @@
struct CallGraphSCCPass : public Pass {
- explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
+ explicit CallGraphSCCPass(intptr_t pid, bool AP = false) : Pass(pid, AP) {}
/// doInitialization - This method is called before the SCC's of the program
/// has been processed, allowing the pass to do initialization as necessary.
Modified: llvm/trunk/include/llvm/Pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Pass.h (original)
+++ llvm/trunk/include/llvm/Pass.h Tue Mar 18 19:48:41 2008
@@ -73,7 +73,7 @@
class Pass {
AnalysisResolver *Resolver; // Used to resolve analysis
intptr_t PassID;
-
+ bool isAnalysisPass; // True if this pass is an analysis pass.
// AnalysisImpls - This keeps track of which passes implement the interfaces
// that are required by the current pass (to implement getAnalysis()).
//
@@ -82,10 +82,14 @@
void operator=(const Pass&); // DO NOT IMPLEMENT
Pass(const Pass &); // DO NOT IMPLEMENT
public:
- explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {}
- explicit Pass(const void *pid) : Resolver(0), PassID((intptr_t)pid) {}
+ explicit Pass(intptr_t pid, bool AP = false) : Resolver(0), PassID(pid),
+ isAnalysisPass(AP) {}
+ explicit Pass(const void *pid, bool AP = false) : Resolver(0),
+ PassID((intptr_t)pid),
+ isAnalysisPass(AP) {}
virtual ~Pass();
+ bool isAnalysis() const { return isAnalysisPass; }
/// getPassName - Return a nice clean name for a pass. This usually
/// implemented in terms of the name that is registered by one of the
/// Registration templates, but can be overloaded directly.
@@ -130,11 +134,6 @@
return Resolver;
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const {
- return false;
- }
-
/// getAnalysisUsage - This function should be overriden by passes that need
/// analysis information to do their job. If a pass specifies that it uses a
/// particular analysis result to this function, it can then use the
@@ -232,8 +231,8 @@
return PMT_ModulePassManager;
}
- explicit ModulePass(intptr_t pid) : Pass(pid) {}
- explicit ModulePass(const void *pid) : Pass(pid) {}
+ explicit ModulePass(intptr_t pid, bool AP = false) : Pass(pid, AP) {}
+ explicit ModulePass(const void *pid, bool AP = false) : Pass(pid, AP) {}
// Force out-of-line virtual method.
virtual ~ModulePass();
};
@@ -258,8 +257,9 @@
///
bool runOnModule(Module &M) { return false; }
- explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
- explicit ImmutablePass(const void *pid) : ModulePass(pid) {}
+ explicit ImmutablePass(intptr_t pid, bool AP = false) : ModulePass(pid, AP) {}
+ explicit ImmutablePass(const void *pid, bool AP = false)
+ : ModulePass(pid, AP) {}
// Force out-of-line virtual method.
virtual ~ImmutablePass();
@@ -276,8 +276,8 @@
///
class FunctionPass : public Pass {
public:
- explicit FunctionPass(intptr_t pid) : Pass(pid) {}
- explicit FunctionPass(const void *pid) : Pass(pid) {}
+ explicit FunctionPass(intptr_t pid, bool AP = false) : Pass(pid, AP) {}
+ explicit FunctionPass(const void *pid, bool AP = false) : Pass(pid, AP) {}
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary per-module initialization.
@@ -328,8 +328,8 @@
///
class BasicBlockPass : public Pass {
public:
- explicit BasicBlockPass(intptr_t pid) : Pass(pid) {}
- explicit BasicBlockPass(const void *pid) : Pass(pid) {}
+ explicit BasicBlockPass(intptr_t pid, bool AP = false) : Pass(pid, AP) {}
+ explicit BasicBlockPass(const void *pid, bool AP = false) : Pass(pid, AP) {}
/// doInitialization - Virtual method overridden by subclasses to do
/// any necessary per-module initialization.
Modified: llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysisCounter.cpp Tue Mar 18 19:48:41 2008
@@ -35,7 +35,7 @@
Module *M;
public:
static char ID; // Class identification, replacement for typeinfo
- AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
+ AliasAnalysisCounter() : ModulePass((intptr_t) &ID, true) {
No = May = Must = 0;
NoMR = JustRef = JustMod = MR = 0;
}
@@ -72,9 +72,6 @@
}
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
bool runOnModule(Module &M) {
this->M = &M;
InitializeAliasAnalysis(this);
Modified: llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysisEvaluator.cpp Tue Mar 18 19:48:41 2008
@@ -52,7 +52,7 @@
public:
static char ID; // Pass identification, replacement for typeid
- AAEval() : FunctionPass((intptr_t)&ID) {}
+ AAEval() : FunctionPass((intptr_t)&ID, true) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<AliasAnalysis>();
@@ -70,9 +70,6 @@
return false;
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
bool runOnFunction(Function &F);
bool doFinalization(Module &M);
};
Modified: llvm/trunk/lib/Analysis/AliasDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasDebugger.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasDebugger.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasDebugger.cpp Tue Mar 18 19:48:41 2008
@@ -41,10 +41,7 @@
public:
static char ID; // Class identification, replacement for typeinfo
- AliasDebugger() : ModulePass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ AliasDebugger() : ModulePass((intptr_t)&ID, true) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this); // set up super class
Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Tue Mar 18 19:48:41 2008
@@ -551,16 +551,13 @@
AliasSetTracker *Tracker;
public:
static char ID; // Pass identification, replacement for typeid
- AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
+ AliasSetPrinter() : FunctionPass((intptr_t)&ID, true) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequired<AliasAnalysis>();
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &F) {
Tracker = new AliasSetTracker(getAnalysis<AliasAnalysis>());
Modified: llvm/trunk/lib/Analysis/CFGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFGPrinter.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CFGPrinter.cpp (original)
+++ llvm/trunk/lib/Analysis/CFGPrinter.cpp Tue Mar 18 19:48:41 2008
@@ -92,10 +92,7 @@
namespace {
struct VISIBILITY_HIDDEN CFGViewer : public FunctionPass {
static char ID; // Pass identifcation, replacement for typeid
- CFGViewer() : FunctionPass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ CFGViewer() : FunctionPass((intptr_t)&ID, true) {}
virtual bool runOnFunction(Function &F) {
F.viewCFG();
@@ -115,10 +112,7 @@
struct VISIBILITY_HIDDEN CFGOnlyViewer : public FunctionPass {
static char ID; // Pass identifcation, replacement for typeid
- CFGOnlyViewer() : FunctionPass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ CFGOnlyViewer() : FunctionPass((intptr_t)&ID, true) {}
virtual bool runOnFunction(Function &F) {
CFGOnly = true;
@@ -141,10 +135,7 @@
struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
CFGPrinter() : FunctionPass((intptr_t)&ID) {}
- explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ explicit CFGPrinter(intptr_t pid) : FunctionPass(pid, true) {}
virtual bool runOnFunction(Function &F) {
std::string Filename = "cfg." + F.getName() + ".dot";
@@ -173,10 +164,6 @@
struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
static char ID; // Pass identification, replacement for typeid
CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
virtual bool runOnFunction(Function &F) {
bool OldCFGOnly = CFGOnly;
CFGOnly = true;
Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp Tue Mar 18 19:48:41 2008
@@ -430,10 +430,7 @@
public:
static char ID;
- Andersens() : ModulePass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ Andersens() : ModulePass((intptr_t)&ID, true) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this);
Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Tue Mar 18 19:48:41 2008
@@ -84,10 +84,7 @@
public:
static char ID;
- GlobalsModRef() : ModulePass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ GlobalsModRef() : ModulePass((intptr_t)&ID, true) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this); // set up super class
Modified: llvm/trunk/lib/Analysis/InstCount.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstCount.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstCount.cpp (original)
+++ llvm/trunk/lib/Analysis/InstCount.cpp Tue Mar 18 19:48:41 2008
@@ -51,12 +51,8 @@
abort();
}
public:
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
static char ID; // Pass identification, replacement for typeid
- InstCount() : FunctionPass((intptr_t)&ID) {}
+ InstCount() : FunctionPass((intptr_t)&ID, true) {}
virtual bool runOnFunction(Function &F);
Modified: llvm/trunk/lib/Analysis/LoadValueNumbering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoadValueNumbering.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoadValueNumbering.cpp (original)
+++ llvm/trunk/lib/Analysis/LoadValueNumbering.cpp Tue Mar 18 19:48:41 2008
@@ -41,10 +41,7 @@
// FIXME: This should not be a FunctionPass.
struct VISIBILITY_HIDDEN LoadVN : public FunctionPass, public ValueNumbering {
static char ID; // Class identification, replacement for typeinfo
- LoadVN() : FunctionPass((intptr_t)&ID) {}
-
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
+ LoadVN() : FunctionPass((intptr_t)&ID, true) {}
/// Pass Implementation stuff. This doesn't do any analysis.
///
Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Tue Mar 18 19:48:41 2008
@@ -34,7 +34,7 @@
public:
static char ID; // Class identification, replacement for typeinfo
explicit LoaderPass(const std::string &filename = "")
- : ModulePass((intptr_t)&ID), Filename(filename) {
+ : ModulePass((intptr_t)&ID, true), Filename(filename) {
if (filename.empty()) Filename = ProfileInfoFilename;
}
@@ -46,9 +46,6 @@
return "Profiling information loader";
}
- /// isAnalysis - Return true if this pass is implementing an analysis pass.
- virtual bool isAnalysis() const { return true; }
-
/// run - Load the profile information from the specified file.
virtual bool runOnModule(Module &M);
};
Modified: llvm/trunk/lib/VMCore/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=48520&r1=48519&r2=48520&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/PassManager.cpp (original)
+++ llvm/trunk/lib/VMCore/PassManager.cpp Tue Mar 18 19:48:41 2008
@@ -430,7 +430,7 @@
// generate the analysis again. Stale analysis info should not be
// available at this point.
if (P->isAnalysis() && findAnalysisPass(P->getPassInfo()))
- return;
+ return;
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
More information about the llvm-commits
mailing list