Changes in directory llvm/include/llvm/Analysis:
AliasAnalysis.h updated: 1.28 -> 1.29 CallGraph.h updated: 1.53 -> 1.54 Dominators.h updated: 1.76 -> 1.77 FindUsedTypes.h updated: 1.29 -> 1.30 IntervalPartition.h updated: 1.23 -> 1.24 LoopInfo.h updated: 1.63 -> 1.64 LoopPass.h updated: 1.15 -> 1.16 PostDominators.h updated: 1.17 -> 1.18 ProfileInfo.h updated: 1.5 -> 1.6 ScalarEvolution.h updated: 1.16 -> 1.17 ValueNumbering.h updated: 1.10 -> 1.11 --- Log message: Do not use typeinfo to identify pass in pass manager. --- Diffs of the changes: (+45 -14) AliasAnalysis.h | 1 + CallGraph.h | 1 + Dominators.h | 27 ++++++++++++++++++--------- FindUsedTypes.h | 3 +++ IntervalPartition.h | 4 +++- LoopInfo.h | 3 +++ LoopPass.h | 3 +++ PostDominators.h | 12 +++++++++--- ProfileInfo.h | 1 + ScalarEvolution.h | 3 ++- ValueNumbering.h | 1 + 11 files changed, 45 insertions(+), 14 deletions(-) Index: llvm/include/llvm/Analysis/AliasAnalysis.h diff -u llvm/include/llvm/Analysis/AliasAnalysis.h:1.28 llvm/include/llvm/Analysis/AliasAnalysis.h:1.29 --- llvm/include/llvm/Analysis/AliasAnalysis.h:1.28 Sun Feb 11 22:59:57 2007 +++ llvm/include/llvm/Analysis/AliasAnalysis.h Tue May 1 16:15:46 2007 @@ -61,6 +61,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const; public: + static const int ID; // Class identification, replacement for typeinfo AliasAnalysis() : TD(0), AA(0) {} virtual ~AliasAnalysis(); // We want to be subclassed Index: llvm/include/llvm/Analysis/CallGraph.h diff -u llvm/include/llvm/Analysis/CallGraph.h:1.53 llvm/include/llvm/Analysis/CallGraph.h:1.54 --- llvm/include/llvm/Analysis/CallGraph.h:1.53 Sat Dec 16 23:15:12 2006 +++ llvm/include/llvm/Analysis/CallGraph.h Tue May 1 16:15:46 2007 @@ -73,6 +73,7 @@ FunctionMapTy FunctionMap; // Map from a function to its node public: + static const int ID; // Class identification, replacement for typeinfo //===--------------------------------------------------------------------- // Accessors... // Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.76 llvm/include/llvm/Analysis/Dominators.h:1.77 --- llvm/include/llvm/Analysis/Dominators.h:1.76 Sat Apr 21 02:04:45 2007 +++ llvm/include/llvm/Analysis/Dominators.h Tue May 1 16:15:46 2007 @@ -42,9 +42,10 @@ protected: std::vector<BasicBlock*> Roots; const bool IsPostDominators; - - inline DominatorBase(bool isPostDom) : Roots(), IsPostDominators(isPostDom) {} + inline DominatorBase(intptr_t ID, bool isPostDom) : + FunctionPass(ID), Roots(), IsPostDominators(isPostDom) {} public: + /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). @@ -135,7 +136,8 @@ }; public: - DominatorTreeBase(bool isPostDom) : DominatorBase(isPostDom) {} + DominatorTreeBase(intptr_t ID, bool isPostDom) + : DominatorBase(ID, isPostDom) {} ~DominatorTreeBase() { reset(); } virtual void releaseMemory() { reset(); } @@ -206,7 +208,8 @@ /// class DominatorTree : public DominatorTreeBase { public: - DominatorTree() : DominatorTreeBase(false) {} + static const int ID; // Pass ID, replacement for typeid + DominatorTree() : DominatorTreeBase((intptr_t)&ID, false) {} BasicBlock *getRoot() const { assert(Roots.size() == 1 && "Should always have entry node!"); @@ -264,8 +267,9 @@ /// class ETForestBase : public DominatorBase { public: - ETForestBase(bool isPostDom) : DominatorBase(isPostDom), Nodes(), - DFSInfoValid(false), SlowQueries(0) {} + ETForestBase(intptr_t ID, bool isPostDom) + : DominatorBase(ID, isPostDom), Nodes(), + DFSInfoValid(false), SlowQueries(0) {} virtual void releaseMemory() { reset(); } @@ -395,7 +399,9 @@ class ETForest : public ETForestBase { public: - ETForest() : ETForestBase(false) {} + static const int ID; // Pass identifcation, replacement for typeid + + ETForest() : ETForestBase((intptr_t)&ID, false) {} BasicBlock *getRoot() const { assert(Roots.size() == 1 && "Should always have entry node!"); @@ -425,7 +431,8 @@ protected: DomSetMapType Frontiers; public: - DominanceFrontierBase(bool isPostDom) : DominatorBase(isPostDom) {} + DominanceFrontierBase(intptr_t ID, bool isPostDom) + : DominatorBase(ID, isPostDom) {} virtual void releaseMemory() { Frontiers.clear(); } @@ -470,7 +477,9 @@ /// class DominanceFrontier : public DominanceFrontierBase { public: - DominanceFrontier() : DominanceFrontierBase(false) {} + static const int ID; // Pass ID, replacement for typeid + DominanceFrontier() : + DominanceFrontierBase((intptr_t)& ID, false) {} BasicBlock *getRoot() const { assert(Roots.size() == 1 && "Should always have entry node!"); Index: llvm/include/llvm/Analysis/FindUsedTypes.h diff -u llvm/include/llvm/Analysis/FindUsedTypes.h:1.29 llvm/include/llvm/Analysis/FindUsedTypes.h:1.30 --- llvm/include/llvm/Analysis/FindUsedTypes.h:1.29 Sat Dec 16 23:15:12 2006 +++ llvm/include/llvm/Analysis/FindUsedTypes.h Tue May 1 16:15:46 2007 @@ -24,6 +24,9 @@ class FindUsedTypes : public ModulePass { std::set<const Type *> UsedTypes; public: + static const int ID; // Pass identifcation, replacement for typeid + FindUsedTypes() : ModulePass((intptr_t)&ID) {} + /// getTypes - After the pass has been run, return the set containing all of /// the types used in the module. /// Index: llvm/include/llvm/Analysis/IntervalPartition.h diff -u llvm/include/llvm/Analysis/IntervalPartition.h:1.23 llvm/include/llvm/Analysis/IntervalPartition.h:1.24 --- llvm/include/llvm/Analysis/IntervalPartition.h:1.23 Sat Dec 16 23:15:12 2006 +++ llvm/include/llvm/Analysis/IntervalPartition.h Tue May 1 16:15:46 2007 @@ -45,7 +45,9 @@ std::vector<Interval*> Intervals; public: - IntervalPartition() : RootInterval(0) {} + static const int ID; // Pass identifcation, replacement for typeid + + IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {} // run - Calculate the interval partition for this function virtual bool runOnFunction(Function &F); Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.63 llvm/include/llvm/Analysis/LoopInfo.h:1.64 --- llvm/include/llvm/Analysis/LoopInfo.h:1.63 Sat Dec 16 23:15:12 2006 +++ llvm/include/llvm/Analysis/LoopInfo.h Tue May 1 16:15:46 2007 @@ -241,6 +241,9 @@ std::vector<Loop*> TopLevelLoops; friend class Loop; public: + static const int ID; // Pass identifcation, replacement for typeid + + LoopInfo() : FunctionPass((intptr_t)&ID) {} ~LoopInfo() { releaseMemory(); } /// iterator/begin/end - The interface to the top-level loops in the current Index: llvm/include/llvm/Analysis/LoopPass.h diff -u llvm/include/llvm/Analysis/LoopPass.h:1.15 llvm/include/llvm/Analysis/LoopPass.h:1.16 --- llvm/include/llvm/Analysis/LoopPass.h:1.15 Mon Apr 16 13:51:25 2007 +++ llvm/include/llvm/Analysis/LoopPass.h Tue May 1 16:15:46 2007 @@ -29,6 +29,8 @@ class LoopPass : public Pass { public: + LoopPass(intptr_t pid) : Pass(pid) {} + // runOnLoop - THis method should be implemented by the subclass to perform // whatever action is necessary for the specfied Loop. virtual bool runOnLoop (Loop *L, LPPassManager &LPM) = 0; @@ -66,6 +68,7 @@ class LPPassManager : public FunctionPass, public PMDataManager { public: + static const int ID; LPPassManager(int Depth); /// run - Execute all of the passes scheduled for execution. Keep track of Index: llvm/include/llvm/Analysis/PostDominators.h diff -u llvm/include/llvm/Analysis/PostDominators.h:1.17 llvm/include/llvm/Analysis/PostDominators.h:1.18 --- llvm/include/llvm/Analysis/PostDominators.h:1.17 Sun Apr 15 18:14:18 2007 +++ llvm/include/llvm/Analysis/PostDominators.h Tue May 1 16:15:46 2007 @@ -22,7 +22,10 @@ /// compute the a post-dominator tree. /// struct PostDominatorTree : public DominatorTreeBase { - PostDominatorTree() : DominatorTreeBase(true) {} + static const int ID; // Pass identifcation, replacement for typeid + + PostDominatorTree() : + DominatorTreeBase((intptr_t)&ID, true) {} virtual bool runOnFunction(Function &F) { reset(); // Reset from the last time we were run... @@ -51,7 +54,8 @@ /// PostETForest Class - Concrete subclass of ETForestBase that is used to /// compute a forwards post-dominator ET-Forest. struct PostETForest : public ETForestBase { - PostETForest() : ETForestBase(true) {} + static const int ID; + PostETForest() : ETForestBase((intptr_t)&ID, true) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); @@ -75,7 +79,9 @@ /// used to compute the a post-dominance frontier. /// struct PostDominanceFrontier : public DominanceFrontierBase { - PostDominanceFrontier() : DominanceFrontierBase(true) {} + static const int ID; + PostDominanceFrontier() + : DominanceFrontierBase((intptr_t) &ID, true) {} virtual bool runOnFunction(Function &) { Frontiers.clear(); Index: llvm/include/llvm/Analysis/ProfileInfo.h diff -u llvm/include/llvm/Analysis/ProfileInfo.h:1.5 llvm/include/llvm/Analysis/ProfileInfo.h:1.6 --- llvm/include/llvm/Analysis/ProfileInfo.h:1.5 Thu Apr 21 15:16:32 2005 +++ llvm/include/llvm/Analysis/ProfileInfo.h Tue May 1 16:15:46 2007 @@ -38,6 +38,7 @@ // entered. std::map<std::pair<BasicBlock*, BasicBlock*>, unsigned> EdgeCounts; public: + static const int ID; // Class identification, replacement for typeinfo virtual ~ProfileInfo(); // We want to be subclassed //===------------------------------------------------------------------===// Index: llvm/include/llvm/Analysis/ScalarEvolution.h diff -u llvm/include/llvm/Analysis/ScalarEvolution.h:1.16 llvm/include/llvm/Analysis/ScalarEvolution.h:1.17 --- llvm/include/llvm/Analysis/ScalarEvolution.h:1.16 Sun Mar 4 18:00:41 2007 +++ llvm/include/llvm/Analysis/ScalarEvolution.h Tue May 1 16:15:46 2007 @@ -197,7 +197,8 @@ class ScalarEvolution : public FunctionPass { void *Impl; // ScalarEvolution uses the pimpl pattern public: - ScalarEvolution() : Impl(0) {} + static const int ID; // Pass identifcation, replacement for typeid + ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {} /// getSCEV - Return a SCEV expression handle for the full generality of the /// specified expression. Index: llvm/include/llvm/Analysis/ValueNumbering.h diff -u llvm/include/llvm/Analysis/ValueNumbering.h:1.10 llvm/include/llvm/Analysis/ValueNumbering.h:1.11 --- llvm/include/llvm/Analysis/ValueNumbering.h:1.10 Wed Jun 7 17:00:25 2006 +++ llvm/include/llvm/Analysis/ValueNumbering.h Tue May 1 16:15:46 2007 @@ -29,6 +29,7 @@ class Instruction; struct ValueNumbering { + static const int ID; // Class identification, replacement for typeinfo virtual ~ValueNumbering(); // We want to be subclassed /// getEqualNumberNodes - Return nodes with the same value number as the _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits