X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fllvm%2FPass.h;h=b5c9f8d8acf28aa8bfd61b11194df29a73582314;hb=a727d5502c8e23c090da658bf14c5ebc1169a070;hp=1ab6ff9a720c88fe13a8a296be3420243e399968;hpb=6e21ff0b0a8e4f0878431afa5628bb1c2db0b8e1;p=oota-llvm.git diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 1ab6ff9a720..b5c9f8d8acf 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -34,7 +34,6 @@ #include #include #include -#include #include namespace llvm { @@ -77,7 +76,7 @@ typedef enum PassManagerType PassManagerType; /// class Pass { AnalysisResolver *Resolver; // Used to resolve analysis - const PassInfo *PassInfoCache; + intptr_t PassID; // AnalysisImpls - This keeps track of which passes implement the interfaces // that are required by the current pass (to implement getAnalysis()). @@ -87,7 +86,7 @@ class Pass { void operator=(const Pass&); // DO NOT IMPLEMENT Pass(const Pass &); // DO NOT IMPLEMENT public: - Pass() : Resolver(0), PassInfoCache(0) {} + Pass(intptr_t pid) : Resolver(0), PassID(pid) {} virtual ~Pass(); /// getPassName - Return a nice clean name for a pass. This usually @@ -163,12 +162,12 @@ public: template static const PassInfo *getClassPassInfo() { - return lookupPassInfo(typeid(AnalysisClass)); + return lookupPassInfo((intptr_t)&AnalysisClass::ID); } // lookupPassInfo - Return the pass info object for the specified pass class, // or null if it is not known. - static const PassInfo *lookupPassInfo(const std::type_info &TI); + static const PassInfo *lookupPassInfo(intptr_t TI); /// getAnalysisToUpdate() - This function is used by subclasses /// to get to the analysis information that might be around that needs to be @@ -232,6 +231,7 @@ public: return PMT_ModulePassManager; } + ModulePass(intptr_t pid) : Pass(pid) {} // Force out-of-line virtual method. virtual ~ModulePass(); }; @@ -256,6 +256,7 @@ public: /// virtual bool runOnModule(Module &M) { return false; } + ImmutablePass(intptr_t pid) : ModulePass(pid) {} // Force out-of-line virtual method. virtual ~ImmutablePass(); }; @@ -271,6 +272,8 @@ public: /// class FunctionPass : public Pass { public: + FunctionPass(intptr_t pid) : Pass(pid) {} + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// @@ -320,6 +323,8 @@ public: /// class BasicBlockPass : public Pass { public: + BasicBlockPass(intptr_t pid) : Pass(pid) {} + /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. ///