diff options
Diffstat (limited to 'lib/Transforms/Scalar')
30 files changed, 31 insertions, 31 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index aef16f7f1c..3481c00143 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -35,7 +35,7 @@ STATISTIC(NumRemoved, "Number of instructions removed"); namespace { struct VISIBILITY_HIDDEN ADCE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - ADCE() : FunctionPass((intptr_t)&ID) {} + ADCE() : FunctionPass(&ID) {} virtual bool runOnFunction(Function& F); diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 041bed234b..fb9b88005b 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -42,7 +42,7 @@ STATISTIC(NumMoved, "Number of basic blocks moved"); namespace { struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass { static char ID; // Pass identification, replacement for typeid - BlockPlacement() : FunctionPass((intptr_t)&ID) {} + BlockPlacement() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index da0d287817..a000c009cc 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -43,7 +43,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit CodeGenPrepare(const TargetLowering *tli = 0) - : FunctionPass((intptr_t)&ID), TLI(tli) {} + : FunctionPass(&ID), TLI(tli) {} bool runOnFunction(Function &F); private: diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index c1e419569f..126e13e453 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/lib/Transforms/Scalar/CondPropagate.cpp @@ -32,7 +32,7 @@ STATISTIC(NumSwThread, "Number of CFG edges threaded through switches"); namespace { struct VISIBILITY_HIDDEN CondProp : public FunctionPass { static char ID; // Pass identification, replacement for typeid - CondProp() : FunctionPass((intptr_t)&ID) {} + CondProp() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 05bb4f0c7b..b933488cf6 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -35,7 +35,7 @@ STATISTIC(NumInstKilled, "Number of instructions killed"); namespace { struct VISIBILITY_HIDDEN ConstantPropagation : public FunctionPass { static char ID; // Pass identification, replacement for typeid - ConstantPropagation() : FunctionPass((intptr_t)&ID) {} + ConstantPropagation() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index a63fcb6589..cb78207d76 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -69,7 +69,7 @@ namespace { // struct DCE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - DCE() : FunctionPass((intptr_t)&ID) {} + DCE() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index b75d5c4be7..7e5fbcb801 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -39,7 +39,7 @@ STATISTIC(NumFastOther , "Number of other instrs removed"); namespace { struct VISIBILITY_HIDDEN DSE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - DSE() : FunctionPass((intptr_t)&ID) {} + DSE() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { bool Changed = false; diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index b258fcc08c..1e5be4ab1a 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -697,7 +697,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVN() : FunctionPass((intptr_t)&ID) { } + GVN() : FunctionPass(&ID) { } private: ValueTable VN; diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index e0c869fbf8..e3b09379a2 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -672,7 +672,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVNPRE() : FunctionPass((intptr_t)&ID) { } + GVNPRE() : FunctionPass(&ID) {} private: ValueTable VN; diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 5d709e50fb..3d29fd6863 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -70,7 +70,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid - IndVarSimplify() : LoopPass((intptr_t)&ID) {} + IndVarSimplify() : LoopPass(&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); bool doInitialization(Loop *L, LPPassManager &LPM); diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index aedad72037..6b25f52a81 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -80,7 +80,7 @@ namespace { bool MustPreserveLCSSA; public: static char ID; // Pass identification, replacement for typeid - InstCombiner() : FunctionPass((intptr_t)&ID) {} + InstCombiner() : FunctionPass(&ID) {} /// AddToWorkList - Add the specified instruction to the worklist if it /// isn't already in it. diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index 1d3bfbfe7c..2f91c07c94 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -52,7 +52,7 @@ namespace { class VISIBILITY_HIDDEN JumpThreading : public FunctionPass { public: static char ID; // Pass identification - JumpThreading() : FunctionPass((intptr_t)&ID) {} + JumpThreading() : FunctionPass(&ID) {} bool runOnFunction(Function &F); bool ThreadBlock(BasicBlock *BB); diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index aef1cd6f6f..3eee4a27f7 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -74,7 +74,7 @@ EnableLICMConstantMotion("enable-licm-constant-variables", cl::Hidden, namespace { struct VISIBILITY_HIDDEN LICM : public LoopPass { static char ID; // Pass identification, replacement for typeid - LICM() : LoopPass((intptr_t)&ID) {} + LICM() : LoopPass(&ID) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp index f68a5f7125..74190f5f77 100644 --- a/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/lib/Transforms/Scalar/LoopDeletion.cpp @@ -30,7 +30,7 @@ namespace { class VISIBILITY_HIDDEN LoopDeletion : public LoopPass { public: static char ID; // Pass ID, replacement for typeid - LoopDeletion() : LoopPass((intptr_t)&ID) { } + LoopDeletion() : LoopPass(&ID) {} // Possibly eliminate loop L if it is dead. bool runOnLoop(Loop* L, LPPassManager& LPM); diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 1ab9a18cf6..d8a1eb68aa 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -33,7 +33,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid - LoopIndexSplit() : LoopPass((intptr_t)&ID) {} + LoopIndexSplit() : LoopPass(&ID) {} // Index split Loop L. Return true if loop is split. bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index f0dd40bd33..488ab0eacf 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -48,7 +48,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid - LoopRotate() : LoopPass((intptr_t)&ID) {} + LoopRotate() : LoopPass(&ID) {} // Rotate Loop L as many times as possible. Return true if // loop is rotated at least once. diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 96fa0e9eb1..6d8de40780 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -148,7 +148,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LoopStrengthReduce(const TargetLowering *tli = NULL) : - LoopPass((intptr_t)&ID), TLI(tli) { + LoopPass(&ID), TLI(tli) { } bool runOnLoop(Loop *L, LPPassManager &LPM); diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index 386b91c252..ed4ea895cc 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -42,7 +42,7 @@ namespace { class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { public: static char ID; // Pass ID, replacement for typeid - LoopUnroll() : LoopPass((intptr_t)&ID) {} + LoopUnroll() : LoopPass(&ID) {} /// A magic value for use with the Threshold parameter to indicate /// that the loop unroll should be performed regardless of how much diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 5473bac555..372e6e4f83 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -87,7 +87,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LoopUnswitch(bool Os = false) : - LoopPass((intptr_t)&ID), OptimizeForSize(Os), redoLoop(false), + LoopPass(&ID), OptimizeForSize(Os), redoLoop(false), currentLoop(NULL), DF(NULL), DT(NULL), loopHeader(NULL), loopPreheader(NULL) {} diff --git a/lib/Transforms/Scalar/MarkModRef.cpp b/lib/Transforms/Scalar/MarkModRef.cpp index e20278aed3..5e83ee9310 100644 --- a/lib/Transforms/Scalar/MarkModRef.cpp +++ b/lib/Transforms/Scalar/MarkModRef.cpp @@ -28,7 +28,7 @@ STATISTIC(NumReadOnly, "Number of functions marked readonly"); namespace { struct VISIBILITY_HIDDEN MarkModRef : public FunctionPass { static char ID; // Pass identification, replacement for typeid - MarkModRef() : FunctionPass((intptr_t)&ID) {} + MarkModRef() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 18f5f0c130..8810edb533 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -300,7 +300,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - MemCpyOpt() : FunctionPass((intptr_t)&ID) { } + MemCpyOpt() : FunctionPass(&ID) {} private: // This transformation requires dominator postdominator info diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index 9a94fad932..665a46bfd7 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -2249,7 +2249,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid - PredicateSimplifier() : FunctionPass((intptr_t)&ID) {} + PredicateSimplifier() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index dbb87c5e5b..313723cfef 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -72,7 +72,7 @@ namespace { bool MadeChange; public: static char ID; // Pass identification, replacement for typeid - Reassociate() : FunctionPass((intptr_t)&ID) {} + Reassociate() : FunctionPass(&ID) {} bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index ce38b08ef9..46b2952b4c 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/lib/Transforms/Scalar/Reg2Mem.cpp @@ -36,7 +36,7 @@ STATISTIC(NumPhisDemoted, "Number of phi-nodes demoted"); namespace { struct VISIBILITY_HIDDEN RegToMem : public FunctionPass { static char ID; // Pass identification, replacement for typeid - RegToMem() : FunctionPass((intptr_t)&ID) {} + RegToMem() : FunctionPass(&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(BreakCriticalEdgesID); diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index ed0f727ecd..48842b2e38 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1497,7 +1497,7 @@ namespace { /// struct VISIBILITY_HIDDEN SCCP : public FunctionPass { static char ID; // Pass identification, replacement for typeid - SCCP() : FunctionPass((intptr_t)&ID) {} + SCCP() : FunctionPass(&ID) {} // runOnFunction - Run the Sparse Conditional Constant Propagation // algorithm, and return true if the function was modified. @@ -1611,7 +1611,7 @@ namespace { /// struct VISIBILITY_HIDDEN IPSCCP : public ModulePass { static char ID; - IPSCCP() : ModulePass((intptr_t)&ID) {} + IPSCCP() : ModulePass(&ID) {} bool runOnModule(Module &M); }; } // end anonymous namespace diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index c5ca22145e..c29202826c 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -48,7 +48,7 @@ STATISTIC(NumGlobals, "Number of allocas copied from constant global"); namespace { struct VISIBILITY_HIDDEN SROA : public FunctionPass { static char ID; // Pass identification, replacement for typeid - explicit SROA(signed T = -1) : FunctionPass((intptr_t)&ID) { + explicit SROA(signed T = -1) : FunctionPass(&ID) { if (T == -1) SRThreshold = 128; else diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 23683289c0..cd063079f6 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -41,7 +41,7 @@ STATISTIC(NumSimpl, "Number of blocks simplified"); namespace { struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid - CFGSimplifyPass() : FunctionPass((intptr_t)&ID) {} + CFGSimplifyPass() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); }; diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 8ef8855355..965d1ce0de 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -1206,7 +1206,7 @@ namespace { FWriteOpt FWrite; FPutsOpt FPuts; FPrintFOpt FPrintF; public: static char ID; // Pass identification - SimplifyLibCalls() : FunctionPass((intptr_t)&ID) {} + SimplifyLibCalls() : FunctionPass(&ID) {} void InitOptimizations(); bool runOnFunction(Function &F); diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index d0998ab5a6..568ec06e39 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -48,7 +48,7 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - TailDup() : FunctionPass((intptr_t)&ID) {} + TailDup() : FunctionPass(&ID) {} private: inline bool shouldEliminateUnconditionalBranch(TerminatorInst *, unsigned); diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 6fcf55b581..e1234efb57 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -68,7 +68,7 @@ STATISTIC(NumAccumAdded, "Number of accumulators introduced"); namespace { struct VISIBILITY_HIDDEN TailCallElim : public FunctionPass { static char ID; // Pass identification, replacement for typeid - TailCallElim() : FunctionPass((intptr_t)&ID) {} + TailCallElim() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); |