diff options
author | Devang Patel <dpatel@apple.com> | 2008-03-19 00:48:41 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-03-19 00:48:41 +0000 |
commit | 8d7db68354b10998a9ec3072f4eeee05c9c0c67e (patch) | |
tree | 8880489b1046f714fff98a468cd30202e533b6f4 /include/llvm/Analysis/Dominators.h | |
parent | 9474c41985014b3289c6a616a3cf51d68c6b53d6 (diff) | |
download | external_llvm-8d7db68354b10998a9ec3072f4eeee05c9c0c67e.zip external_llvm-8d7db68354b10998a9ec3072f4eeee05c9c0c67e.tar.gz external_llvm-8d7db68354b10998a9ec3072f4eeee05c9c0c67e.tar.bz2 |
Do not use virtual function to identify an analysis pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 8c1a3ed..1b7fa75 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -300,9 +300,6 @@ public: // 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 @@ public: 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 @@ public: 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 @@ protected: 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 @@ public: 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>(); |