Changes in directory llvm/lib/Analysis/IPA:
Andersens.cpp updated: 1.46 -> 1.47 CallGraph.cpp updated: 1.65 -> 1.66 CallGraphSCCPass.cpp updated: 1.21 -> 1.22 FindUsedTypes.cpp updated: 1.38 -> 1.39 GlobalsModRef.cpp updated: 1.29 -> 1.30 --- Log message: Do not use typeinfo to identify pass in pass manager. --- Diffs of the changes: (+20 -2) Andersens.cpp | 6 ++++++ CallGraph.cpp | 6 +++++- CallGraphSCCPass.cpp | 5 ++++- FindUsedTypes.cpp | 1 + GlobalsModRef.cpp | 4 ++++ 5 files changed, 20 insertions(+), 2 deletions(-) Index: llvm/lib/Analysis/IPA/Andersens.cpp diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.46 llvm/lib/Analysis/IPA/Andersens.cpp:1.47 --- llvm/lib/Analysis/IPA/Andersens.cpp:1.46 Sun Mar 4 18:00:42 2007 +++ llvm/lib/Analysis/IPA/Andersens.cpp Tue May 1 16:15:46 2007 @@ -75,12 +75,17 @@ namespace { class VISIBILITY_HIDDEN Andersens : public ModulePass, public AliasAnalysis, private InstVisitor<Andersens> { + public: + static const int ID; // Class identification, replacement for typeinfo + Andersens() : ModulePass((intptr_t)&ID) {} + private: /// Node class - This class is used to represent a memory object in the /// program, and is the primitive used to build the points-to graph. class Node { std::vector<Node*> Pointees; Value *Val; public: + static const unsigned ID; // Pass identifcation, replacement for typeid Node() : Val(0) {} Node *setValue(Value *V) { assert(Val == 0 && "Value already set for this node!"); @@ -334,6 +339,7 @@ void visitInstruction(Instruction &I); }; + const int Andersens::ID = 0; RegisterPass<Andersens> X("anders-aa", "Andersen's Interprocedural Alias Analysis"); RegisterAnalysisGroup<AliasAnalysis> Y(X); Index: llvm/lib/Analysis/IPA/CallGraph.cpp diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.65 llvm/lib/Analysis/IPA/CallGraph.cpp:1.66 --- llvm/lib/Analysis/IPA/CallGraph.cpp:1.65 Mon Feb 5 17:42:17 2007 +++ llvm/lib/Analysis/IPA/CallGraph.cpp Tue May 1 16:15:46 2007 @@ -51,7 +51,9 @@ CallGraphNode *CallsExternalNode; public: - BasicCallGraph() : Root(0), ExternalCallingNode(0), CallsExternalNode(0) {} + static const int ID; // Class identification, replacement for typeinfo + BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0), + ExternalCallingNode(0), CallsExternalNode(0) {} // runOnModule - Compute the call graph for the specified module. virtual bool runOnModule(Module &M) { @@ -188,7 +190,9 @@ } }; +const int CallGraph::ID = 0; RegisterAnalysisGroup<CallGraph> X("Call Graph"); +const int BasicCallGraph::ID = 0; RegisterPass<BasicCallGraph> Y("basiccg", "Basic CallGraph Construction"); RegisterAnalysisGroup<CallGraph, true> Z(Y); Index: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp diff -u llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.21 llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.22 --- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.21 Mon Apr 16 13:10:22 2007 +++ llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp Tue May 1 16:15:46 2007 @@ -30,7 +30,9 @@ class CGPassManager : public ModulePass, public PMDataManager { public: - CGPassManager(int Depth) : PMDataManager(Depth) { } + static const int ID; + CGPassManager(int Depth) + : ModulePass((intptr_t)&ID), PMDataManager(Depth) { } /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the module, and if so, return true. @@ -71,6 +73,7 @@ } }; +const int CGPassManager::ID = 0; /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the module, and if so, return true. bool CGPassManager::runOnModule(Module &M) { Index: llvm/lib/Analysis/IPA/FindUsedTypes.cpp diff -u llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.38 llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.39 --- llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.38 Wed Dec 6 00:35:25 2006 +++ llvm/lib/Analysis/IPA/FindUsedTypes.cpp Tue May 1 16:15:46 2007 @@ -21,6 +21,7 @@ #include "llvm/Support/InstIterator.h" using namespace llvm; +const int FindUsedTypes::ID = 0; static RegisterPass<FindUsedTypes> X("printusedtypes", "Find Used Types"); Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.29 llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.30 --- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.29 Mon Feb 5 17:42:17 2007 +++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp Tue May 1 16:15:46 2007 @@ -83,6 +83,9 @@ std::map<Function*, FunctionRecord> FunctionInfo; public: + static const int ID; + GlobalsModRef() : ModulePass((intptr_t)&ID) {} + bool runOnModule(Module &M) { InitializeAliasAnalysis(this); // set up super class AnalyzeGlobals(M); // find non-addr taken globals @@ -143,6 +146,7 @@ bool AnalyzeIndirectGlobalMemory(GlobalValue *GV); }; + const int GlobalsModRef::ID = 0; RegisterPass<GlobalsModRef> X("globalsmodref-aa", "Simple mod/ref analysis for globals"); RegisterAnalysisGroup<AliasAnalysis> Y(X); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits