From b90f78e2b3564d44792771fb93cbfc93a081ebec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 21 Aug 2002 17:09:45 +0000 Subject: [PATCH] - Do not expose ::ID from any of the analyses anymore. llvm-svn: 3416 --- include/llvm/Analysis/CallGraph.h | 2 -- include/llvm/Analysis/DataStructure.h | 6 ------ include/llvm/Analysis/Dominators.h | 16 ---------------- include/llvm/Analysis/FindUnsafePointerTypes.h | 2 -- include/llvm/Analysis/FindUsedTypes.h | 5 ----- include/llvm/Analysis/IntervalPartition.h | 2 -- include/llvm/Analysis/LoopInfo.h | 2 -- .../Transforms/Utils/UnifyFunctionExitNodes.h | 3 +-- lib/Analysis/DataStructure/BottomUpClosure.cpp | 1 - lib/Analysis/DataStructure/Local.cpp | 1 - lib/Analysis/DataStructure/TopDownClosure.cpp | 1 - lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | 1 - 12 files changed, 1 insertion(+), 41 deletions(-) diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 4d24be3dd7b..3c9106cec2e 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -121,8 +121,6 @@ public: //===--------------------------------------------------------------------- // Pass infrastructure interface glue code... // - static AnalysisID ID; // We are an analysis, we must have an ID - CallGraph() : Root(0) {} ~CallGraph() { destroy(); } diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h index cabefb95d51..667250e40fe 100644 --- a/include/llvm/Analysis/DataStructure.h +++ b/include/llvm/Analysis/DataStructure.h @@ -388,8 +388,6 @@ class LocalDataStructures : public Pass { // DSInfo, one graph for each function std::map DSInfo; public: - static AnalysisID ID; // DataStructure Analysis ID - ~LocalDataStructures() { releaseMemory(); } virtual bool run(Module &M); @@ -422,8 +420,6 @@ class BUDataStructures : public Pass { // DSInfo, one graph for each function std::map DSInfo; public: - static AnalysisID ID; // BUDataStructure Analysis ID - ~BUDataStructures() { releaseMemory(); } virtual bool run(Module &M); @@ -459,8 +455,6 @@ class TDDataStructures : public Pass { // DSInfo, one graph for each function std::map DSInfo; public: - static AnalysisID ID; // TDDataStructure Analysis ID - ~TDDataStructures() { releaseMemory(); } virtual bool run(Module &M); diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index ba67fead8eb..5ef302fef38 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -97,8 +97,6 @@ public: // compute a normal dominator set. // struct DominatorSet : public DominatorSetBase { - static AnalysisID ID; // Build dominator set - DominatorSet() : DominatorSetBase(false) {} virtual bool runOnFunction(Function &F); @@ -115,8 +113,6 @@ struct DominatorSet : public DominatorSetBase { // compute the post-dominator set. // struct PostDominatorSet : public DominatorSetBase { - static AnalysisID ID; // Build post-dominator set - PostDominatorSet() : DominatorSetBase(true) {} virtual bool runOnFunction(Function &F); @@ -169,8 +165,6 @@ public: // is used to compute a normal immediate dominator set. // struct ImmediateDominators : public ImmediateDominatorsBase { - static AnalysisID ID; // Build immediate dominators - ImmediateDominators() : ImmediateDominatorsBase(false) {} virtual bool runOnFunction(Function &F) { @@ -193,8 +187,6 @@ struct ImmediateDominators : public ImmediateDominatorsBase { // that is used to compute the immediate post-dominators. // struct ImmediatePostDominators : public ImmediateDominatorsBase { - static AnalysisID ID; // Build immediate postdominators - ImmediatePostDominators() : ImmediateDominatorsBase(true) {} virtual bool runOnFunction(Function &F) { @@ -273,8 +265,6 @@ public: // compute a normal dominator tree. // struct DominatorTree : public DominatorTreeBase { - static AnalysisID ID; // Build dominator tree - DominatorTree() : DominatorTreeBase(false) {} virtual bool runOnFunction(Function &F) { @@ -299,8 +289,6 @@ private: // compute the a post-dominator tree. // struct PostDominatorTree : public DominatorTreeBase { - static AnalysisID ID; // Build immediate postdominators - PostDominatorTree() : DominatorTreeBase(true) {} virtual bool runOnFunction(Function &F) { @@ -351,8 +339,6 @@ public: // compute a normal dominator tree. // struct DominanceFrontier : public DominanceFrontierBase { - static AnalysisID ID; // Build dominance frontier - DominanceFrontier() : DominanceFrontierBase(false) {} virtual bool runOnFunction(Function &) { @@ -379,8 +365,6 @@ private: // used to compute the a post-dominance frontier. // struct PostDominanceFrontier : public DominanceFrontierBase { - static AnalysisID ID; // Build post dominance frontier - PostDominanceFrontier() : DominanceFrontierBase(true) {} virtual bool runOnFunction(Function &) { diff --git a/include/llvm/Analysis/FindUnsafePointerTypes.h b/include/llvm/Analysis/FindUnsafePointerTypes.h index 44c18cbc022..e4e33df6b08 100644 --- a/include/llvm/Analysis/FindUnsafePointerTypes.h +++ b/include/llvm/Analysis/FindUnsafePointerTypes.h @@ -26,8 +26,6 @@ struct FindUnsafePointerTypes : public Pass { // UnsafeTypes - Set of types that are not safe to transform. std::set UnsafeTypes; public: - static AnalysisID ID; // We are an analysis, we must have an ID - // Accessor for underlying type set... inline const std::set &getUnsafeTypes() const { return UnsafeTypes; diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 000e4b7506f..6154eddc4a4 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -15,11 +15,6 @@ class Type; class FindUsedTypes : public Pass { std::set UsedTypes; public: - // FindUsedTypes ctor - This pass can optionally include types that are - // referenced only in symbol tables, but the default is not to. - // - static AnalysisID ID; - // getTypes - After the pass has been run, return the set containing all of // the types used in the module. // diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h index 197c469db98..44e730c42b9 100644 --- a/include/llvm/Analysis/IntervalPartition.h +++ b/include/llvm/Analysis/IntervalPartition.h @@ -36,8 +36,6 @@ class IntervalPartition : public FunctionPass { std::vector Intervals; public: - static AnalysisID ID; // We are an analysis, we must have an ID - IntervalPartition() : RootInterval(0) {} // run - Calculate the interval partition for this function diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index ae150d4619b..be85e88b46b 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -67,8 +67,6 @@ class LoopInfo : public FunctionPass { std::map BBMap; std::vector TopLevelLoops; public: - static AnalysisID ID; // LoopInfo Analysis ID - // LoopInfo ctor - Calculate the natural loop information for a CFG ~LoopInfo() { releaseMemory(); } diff --git a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h index 4035dca3fa9..d31e55b3a83 100644 --- a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h +++ b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h @@ -15,8 +15,7 @@ struct UnifyFunctionExitNodes : public FunctionPass { BasicBlock *ExitNode; public: - static AnalysisID ID; // Pass ID - UnifyFunctionExitNodes(AnalysisID id = ID) : ExitNode(0) { assert(ID == id); } + UnifyFunctionExitNodes() : ExitNode(0) {} // getExitNode - Return the new single (or nonexistant) exit node of the CFG. // diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index 2d2a182a4f5..2ab97442d18 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -16,7 +16,6 @@ using std::map; static RegisterAnalysis X("budatastructure", "Bottom-up Data Structure Analysis Closure"); -AnalysisID BUDataStructures::ID = X; // releaseMemory - If the pass pipeline is done with this pass, we can release // our memory... here... diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index eb3d5b7374a..1abc199a9c6 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -20,7 +20,6 @@ using std::vector; static RegisterAnalysis X("datastructure", "Local Data Structure Analysis"); -AnalysisID LocalDataStructures::ID = X; //===----------------------------------------------------------------------===// // GraphBuilder Class diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index ca6556d8ffa..ca4828d1d4b 100644 --- a/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -15,7 +15,6 @@ using std::map; static RegisterAnalysis Y("tddatastructure", "Top-down Data Structure Analysis Closure"); -AnalysisID TDDataStructures::ID = Y; // releaseMemory - If the pass pipeline is done with this pass, we can release // our memory... here... diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp index 3acef1bfd18..e63d96c634e 100644 --- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp @@ -17,7 +17,6 @@ static RegisterAnalysis X("livevar", "Live Variable Analysis"); -AnalysisID FunctionLiveVarInfo::ID = X; LiveVarDebugLevel_t DEBUG_LV;