Changes in directory llvm/lib/Transforms/Utils:
BreakCriticalEdges.cpp updated: 1.44 -> 1.45 LCSSA.cpp updated: 1.38 -> 1.39 LoopSimplify.cpp updated: 1.92 -> 1.93 LowerAllocations.cpp updated: 1.73 -> 1.74 LowerInvoke.cpp updated: 1.59 -> 1.60 LowerSelect.cpp updated: 1.12 -> 1.13 LowerSwitch.cpp updated: 1.38 -> 1.39 Mem2Reg.cpp updated: 1.26 -> 1.27 UnifyFunctionExitNodes.cpp updated: 1.36 -> 1.37 --- Log message: Do not use typeinfo to identify pass in pass manager. --- Diffs of the changes: (+33 -3) BreakCriticalEdges.cpp | 4 ++++ LCSSA.cpp | 4 ++++ LoopSimplify.cpp | 4 ++++ LowerAllocations.cpp | 5 ++++- LowerInvoke.cpp | 5 ++++- LowerSelect.cpp | 5 ++++- LowerSwitch.cpp | 4 ++++ Mem2Reg.cpp | 4 ++++ UnifyFunctionExitNodes.cpp | 1 + 9 files changed, 33 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.44 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.45 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.44 Tue Apr 17 13:09:47 2007 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Tue May 1 16:15:47 2007 @@ -34,6 +34,9 @@ namespace { struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + BreakCriticalEdges() : FunctionPass((intptr_t)&ID) {} + virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -47,6 +50,7 @@ } }; + const int BreakCriticalEdges::ID = 0; RegisterPass<BreakCriticalEdges> X("break-crit-edges", "Break critical edges in CFG"); } Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.38 llvm/lib/Transforms/Utils/LCSSA.cpp:1.39 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.38 Wed Apr 18 17:39:00 2007 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Tue May 1 16:15:47 2007 @@ -47,6 +47,9 @@ namespace { struct VISIBILITY_HIDDEN LCSSA : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + LCSSA() : FunctionPass((intptr_t)&ID) {} + // Cached analysis information for the current function. LoopInfo *LI; DominatorTree *DT; @@ -81,6 +84,7 @@ } }; + const int LCSSA::ID = 0; RegisterPass<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass"); } Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.92 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.93 --- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.92 Fri Apr 20 15:04:37 2007 +++ llvm/lib/Transforms/Utils/LoopSimplify.cpp Tue May 1 16:15:47 2007 @@ -54,6 +54,9 @@ namespace { struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + LoopSimplify() : FunctionPass((intptr_t)&ID) {} + // AA - If we have an alias analysis object to update, this is it, otherwise // this is null. AliasAnalysis *AA; @@ -89,6 +92,7 @@ std::vector<BasicBlock*> &PredBlocks); }; + const int LoopSimplify::ID = 0; RegisterPass<LoopSimplify> X("loopsimplify", "Canonicalize natural loops", true); } Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.73 llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.74 --- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.73 Mon Apr 16 13:10:23 2007 +++ llvm/lib/Transforms/Utils/LowerAllocations.cpp Tue May 1 16:15:47 2007 @@ -36,8 +36,10 @@ Constant *FreeFunc; // Initialized by doInitialization bool LowerMallocArgToInteger; public: + static const int ID; // Pass ID, replacement for typeid LowerAllocations(bool LowerToInt = false) - : MallocFunc(0), FreeFunc(0), LowerMallocArgToInteger(LowerToInt) {} + : BasicBlockPass((intptr_t)&ID), MallocFunc(0), FreeFunc(0), + LowerMallocArgToInteger(LowerToInt) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<TargetData>(); @@ -66,6 +68,7 @@ bool runOnBasicBlock(BasicBlock &BB); }; + const int LowerAllocations::ID = 0; RegisterPass<LowerAllocations> X("lowerallocs", "Lower allocations from instructions to calls"); } Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.59 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.60 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.59 Fri Apr 20 17:40:10 2007 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Tue May 1 16:15:47 2007 @@ -75,7 +75,9 @@ const TargetLowering *TLI; public: - LowerInvoke(const TargetLowering *tli = NULL) : TLI(tli) { } + static const int ID; // Pass identifcation, replacement for typeid + LowerInvoke(const TargetLowering *tli = NULL) : FunctionPass((intptr_t)&ID), + TLI(tli) { } bool doInitialization(Module &M); bool runOnFunction(Function &F); @@ -97,6 +99,7 @@ bool insertExpensiveEHSupport(Function &F); }; + const int LowerInvoke::ID = 0; RegisterPass<LowerInvoke> X("lowerinvoke", "Lower invoke and unwind, for unwindless code generators"); } Index: llvm/lib/Transforms/Utils/LowerSelect.cpp diff -u llvm/lib/Transforms/Utils/LowerSelect.cpp:1.12 llvm/lib/Transforms/Utils/LowerSelect.cpp:1.13 --- llvm/lib/Transforms/Utils/LowerSelect.cpp:1.12 Mon Apr 16 13:10:23 2007 +++ llvm/lib/Transforms/Utils/LowerSelect.cpp Tue May 1 16:15:47 2007 @@ -33,7 +33,9 @@ class VISIBILITY_HIDDEN LowerSelect : public FunctionPass { bool OnlyFP; // Only lower FP select instructions? public: - LowerSelect(bool onlyfp = false) : OnlyFP(onlyfp) {} + static const int ID; // Pass identifcation, replacement for typeid + LowerSelect(bool onlyfp = false) : FunctionPass((intptr_t)&ID), + OnlyFP(onlyfp) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { // This certainly destroys the CFG. @@ -48,6 +50,7 @@ bool runOnFunction(Function &F); }; + const int LowerSelect::ID = 0; RegisterPass<LowerSelect> X("lowerselect", "Lower select instructions to branches"); } Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.38 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.39 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.38 Tue Apr 17 13:09:47 2007 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Tue May 1 16:15:47 2007 @@ -30,6 +30,9 @@ /// modifies the CFG! class VISIBILITY_HIDDEN LowerSwitch : public FunctionPass { public: + static const int ID; // Pass identifcation, replacement for typeid + LowerSwitch() : FunctionPass((intptr_t) &ID) {} + virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -75,6 +78,7 @@ } }; + const int LowerSwitch::ID = 0; RegisterPass<LowerSwitch> X("lowerswitch", "Lower SwitchInst's to branches"); } Index: llvm/lib/Transforms/Utils/Mem2Reg.cpp diff -u llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.26 llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.27 --- llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.26 Wed Apr 25 13:32:35 2007 +++ llvm/lib/Transforms/Utils/Mem2Reg.cpp Tue May 1 16:15:47 2007 @@ -27,6 +27,9 @@ namespace { struct VISIBILITY_HIDDEN PromotePass : public FunctionPass { + static const int ID; // Pass identifcation, replacement for typeid + PromotePass() : FunctionPass((intptr_t)&ID) {} + // runOnFunction - To run this pass, first we calculate the alloca // instructions that are safe for promotion, then we promote each one. // @@ -47,6 +50,7 @@ } }; + const int PromotePass::ID = 0; RegisterPass<PromotePass> X("mem2reg", "Promote Memory to Register"); } // end of anonymous namespace Index: llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp diff -u llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.36 llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.37 --- llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.36 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp Tue May 1 16:15:47 2007 @@ -22,6 +22,7 @@ #include "llvm/Type.h" using namespace llvm; +const int UnifyFunctionExitNodes::ID = 0; static RegisterPass<UnifyFunctionExitNodes> X("mergereturn", "Unify function exit nodes"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits