diff options
Diffstat (limited to 'lib/Transforms')
59 files changed, 67 insertions, 67 deletions
diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp index f2a8322..d07f613 100644 --- a/lib/Transforms/Hello/Hello.cpp +++ b/lib/Transforms/Hello/Hello.cpp @@ -26,7 +26,7 @@ namespace { // Hello - The first implementation, without getAnalysisUsage. struct Hello : public FunctionPass { static char ID; // Pass identification, replacement for typeid - Hello() : FunctionPass((intptr_t)&ID) {} + Hello() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { HelloCounter++; @@ -45,7 +45,7 @@ namespace { // Hello2 - The second implementation with getAnalysisUsage implemented. struct Hello2 : public FunctionPass { static char ID; // Pass identification, replacement for typeid - Hello2() : FunctionPass((intptr_t)&ID) {} + Hello2() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { HelloCounter++; diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 5934c5e..9743380 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -66,7 +66,7 @@ namespace { virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC); static char ID; // Pass identification, replacement for typeid - ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass((intptr_t)&ID), + ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass(&ID), maxElements(maxElements) {} /// A vector used to hold the indices of a single GEP instruction diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp index 86cfcc4..b4bab2d 100644 --- a/lib/Transforms/IPO/ConstantMerge.cpp +++ b/lib/Transforms/IPO/ConstantMerge.cpp @@ -31,7 +31,7 @@ STATISTIC(NumMerged, "Number of global constants merged"); namespace { struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass { static char ID; // Pass identification, replacement for typeid - ConstantMerge() : ModulePass((intptr_t)&ID) {} + ConstantMerge() : ModulePass(&ID) {} // run - For this pass, process all of the globals in the module, // eliminating duplicate constants. diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 5f1920b..ec8f136 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -121,7 +121,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid - DAE() : ModulePass((intptr_t)&ID) {} + DAE() : ModulePass(&ID) {} bool runOnModule(Module &M); virtual bool ShouldHackArguments() const { return false; } diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 3cb658e..85aed2b 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -27,7 +27,7 @@ STATISTIC(NumKilled, "Number of unused typenames removed from symtab"); namespace { struct VISIBILITY_HIDDEN DTE : public ModulePass { static char ID; // Pass identification, replacement for typeid - DTE() : ModulePass((intptr_t)&ID) {} + DTE() : ModulePass(&ID) {} // doPassInitialization - For this pass, it removes global symbol table // entries for primitive types. These are never used for linking in GCC and diff --git a/lib/Transforms/IPO/ExtractGV.cpp b/lib/Transforms/IPO/ExtractGV.cpp index 03a8e5c..d409b6e 100644 --- a/lib/Transforms/IPO/ExtractGV.cpp +++ b/lib/Transforms/IPO/ExtractGV.cpp @@ -35,7 +35,7 @@ namespace { /// explicit GVExtractorPass(std::vector<GlobalValue*>& GVs, bool deleteS = true, bool relinkCallees = false) - : ModulePass((intptr_t)&ID), Named(GVs), deleteStuff(deleteS), + : ModulePass(&ID), Named(GVs), deleteStuff(deleteS), reLink(relinkCallees) {} bool runOnModule(Module &M) { diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index 608705b..020c70a 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/lib/Transforms/IPO/GlobalDCE.cpp @@ -31,7 +31,7 @@ STATISTIC(NumVariables, "Number of global variables removed"); namespace { struct VISIBILITY_HIDDEN GlobalDCE : public ModulePass { static char ID; // Pass identification, replacement for typeid - GlobalDCE() : ModulePass((intptr_t)&ID) {} + GlobalDCE() : ModulePass(&ID) {} // run - Do the GlobalDCE pass on the specified module, optionally updating // the specified callgraph to reflect the changes. diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index f63ef46..f9a7c73 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -57,7 +57,7 @@ namespace { AU.addRequired<TargetData>(); } static char ID; // Pass identification, replacement for typeid - GlobalOpt() : ModulePass((intptr_t)&ID) {} + GlobalOpt() : ModulePass(&ID) {} bool runOnModule(Module &M); diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 42c02e6..aecec44 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -36,7 +36,7 @@ namespace { /// struct VISIBILITY_HIDDEN IPCP : public ModulePass { static char ID; // Pass identification, replacement for typeid - IPCP() : ModulePass((intptr_t)&ID) {} + IPCP() : ModulePass(&ID) {} bool runOnModule(Module &M); private: diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp index 8448374..2e09fe9 100644 --- a/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/lib/Transforms/IPO/IndMemRemoval.cpp @@ -33,7 +33,7 @@ namespace { class VISIBILITY_HIDDEN IndMemRemPass : public ModulePass { public: static char ID; // Pass identification, replacement for typeid - IndMemRemPass() : ModulePass((intptr_t)&ID) {} + IndMemRemPass() : ModulePass(&ID) {} virtual bool runOnModule(Module &M); }; diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index 38cb67d..88b6afd 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -34,11 +34,11 @@ static cl::opt<int> InlineLimit("inline-threshold", cl::Hidden, cl::init(200), cl::desc("Control the amount of inlining to perform (default = 200)")); -Inliner::Inliner(const void *ID) - : CallGraphSCCPass((intptr_t)ID), InlineThreshold(InlineLimit) {} +Inliner::Inliner(void *ID) + : CallGraphSCCPass(ID), InlineThreshold(InlineLimit) {} -Inliner::Inliner(const void *ID, int Threshold) - : CallGraphSCCPass((intptr_t)ID), InlineThreshold(Threshold) {} +Inliner::Inliner(void *ID, int Threshold) + : CallGraphSCCPass(ID), InlineThreshold(Threshold) {} /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 577d69c..cbfccf2 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -60,7 +60,7 @@ static RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols"); InternalizePass::InternalizePass(bool AllButMain) - : ModulePass((intptr_t)&ID), AllButMain(AllButMain){ + : ModulePass(&ID), AllButMain(AllButMain){ if (!APIFile.empty()) // If a filename is specified, use it. LoadFile(APIFile.c_str()); if (!APIList.empty()) // If a list is specified, use it as well. @@ -68,7 +68,7 @@ InternalizePass::InternalizePass(bool AllButMain) } InternalizePass::InternalizePass(const std::vector<const char *>&exportList) - : ModulePass((intptr_t)&ID), AllButMain(false){ + : ModulePass(&ID), AllButMain(false){ for(std::vector<const char *>::const_iterator itr = exportList.begin(); itr != exportList.end(); itr++) { ExternalNames.insert(*itr); diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index 8e55b3f..0c65443 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -41,7 +41,7 @@ namespace { unsigned NumLoops; explicit LoopExtractor(unsigned numLoops = ~0) - : FunctionPass((intptr_t)&ID), NumLoops(numLoops) {} + : FunctionPass(&ID), NumLoops(numLoops) {} virtual bool runOnFunction(Function &F); @@ -167,11 +167,11 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit BlockExtractorPass(const std::vector<BasicBlock*> &B) - : ModulePass((intptr_t)&ID), BlocksToNotExtract(B) { + : ModulePass(&ID), BlocksToNotExtract(B) { if (!BlockFile.empty()) LoadFile(BlockFile.c_str()); } - BlockExtractorPass() : ModulePass((intptr_t)&ID) {} + BlockExtractorPass() : ModulePass(&ID) {} bool runOnModule(Module &M); }; diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 80158b4..d5997fb 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -112,7 +112,7 @@ namespace { bool IsTransformableFunction(const std::string& Name); public: static char ID; // Pass identification, replacement for typeid - LowerSetJmp() : ModulePass((intptr_t)&ID) {} + LowerSetJmp() : ModulePass(&ID) {} void visitCallInst(CallInst& CI); void visitInvokeInst(InvokeInst& II); diff --git a/lib/Transforms/IPO/PartialSpecialization.cpp b/lib/Transforms/IPO/PartialSpecialization.cpp index d39ea58..949358e 100644 --- a/lib/Transforms/IPO/PartialSpecialization.cpp +++ b/lib/Transforms/IPO/PartialSpecialization.cpp @@ -45,7 +45,7 @@ namespace { int scanDistribution(Function&, int, std::map<Constant*, int>&); public : static char ID; // Pass identification, replacement for typeid - PartSpec() : ModulePass((intptr_t)&ID) {} + PartSpec() : ModulePass(&ID) {} bool runOnModule(Module &M); }; } diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index d4194a1..5e50e20 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -35,7 +35,7 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized"); namespace { struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass { static char ID; // Pass identification, replacement for typeid - PruneEH() : CallGraphSCCPass((intptr_t)&ID) {} + PruneEH() : CallGraphSCCPass(&ID) {} // runOnSCC - Analyze the SCC, performing the transformation if possible. bool runOnSCC(const std::vector<CallGraphNode *> &SCC); diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp index daf8ef0..a81bbdb 100644 --- a/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/lib/Transforms/IPO/RaiseAllocations.cpp @@ -37,7 +37,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid RaiseAllocations() - : ModulePass((intptr_t)&ID), MallocFunc(0), FreeFunc(0) {} + : ModulePass(&ID), MallocFunc(0), FreeFunc(0) {} // doPassInitialization - For the raise allocations pass, this finds a // declaration for malloc and free if they exist. diff --git a/lib/Transforms/IPO/StripDeadPrototypes.cpp b/lib/Transforms/IPO/StripDeadPrototypes.cpp index 7db0aa8..a94d78e 100644 --- a/lib/Transforms/IPO/StripDeadPrototypes.cpp +++ b/lib/Transforms/IPO/StripDeadPrototypes.cpp @@ -30,7 +30,7 @@ namespace { class VISIBILITY_HIDDEN StripDeadPrototypesPass : public ModulePass { public: static char ID; // Pass identification, replacement for typeid - StripDeadPrototypesPass() : ModulePass((intptr_t)&ID) { } + StripDeadPrototypesPass() : ModulePass(&ID) { } virtual bool runOnModule(Module &M); }; diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index 63e1a7b..6277f07 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -38,7 +38,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit StripSymbols(bool ODI = false) - : ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {} + : ModulePass(&ID), OnlyDebugInfo(ODI) {} virtual bool runOnModule(Module &M); diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp index 2f44d80..2a7de3d 100644 --- a/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/lib/Transforms/IPO/StructRetPromotion.cpp @@ -49,7 +49,7 @@ namespace { virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC); static char ID; // Pass identification, replacement for typeid - SRETPromotion() : CallGraphSCCPass((intptr_t)&ID) {} + SRETPromotion() : CallGraphSCCPass(&ID) {} private: bool PromoteReturn(CallGraphNode *CGN); diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 2cf824b..0831f3b 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -34,7 +34,7 @@ namespace { bool runOnModule(Module &M); public: static char ID; // Pass identification, replacement for typeid - EdgeProfiler() : ModulePass((intptr_t)&ID) {} + EdgeProfiler() : ModulePass(&ID) {} }; } diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index 45a7c71..c6cf4df 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -144,7 +144,7 @@ namespace { /// ProfilerRS - Insert the random sampling framework struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass { static char ID; // Pass identification, replacement for typeid - ProfilerRS() : FunctionPass((intptr_t)&ID) {} + ProfilerRS() : FunctionPass(&ID) {} std::map<Value*, Value*> TransCache; std::set<BasicBlock*> ChoicePoints; diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index aef16f7..3481c00 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 041bed2..fb9b880 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 da0d287..a000c00 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 c1e4195..126e13e 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 05bb4f0..b933488 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 a63fcb6..cb78207 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 b75d5c4..7e5fbcb 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 b258fcc..1e5be4a 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 e0c869f..e3b0937 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 5d709e5..3d29fd6 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 aedad72..6b25f52 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 1d3bfbf..2f91c07 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 aef1cd6..3eee4a2 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 f68a5f7..74190f5 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 1ab9a18..d8a1eb6 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 f0dd40b..488ab0e 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 96fa0e9..6d8de40 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 386b91c..ed4ea89 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 5473bac..372e6e4 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 e20278a..5e83ee9 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 18f5f0c..8810edb 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 9a94fad..665a46b 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 dbb87c5..313723c 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 ce38b08..46b2952 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 ed0f727..48842b2 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 c5ca221..c292028 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 2368328..cd06307 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 8ef8855..965d1ce 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 d0998ab..568ec06 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 6fcf55b..e1234ef 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); diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index a821423..a32c016 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -35,7 +35,7 @@ STATISTIC(NumBroken, "Number of blocks inserted"); namespace { struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass { static char ID; // Pass identification, replacement for typeid - BreakCriticalEdges() : FunctionPass((intptr_t)&ID) {} + BreakCriticalEdges() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index 55d7a48..bcba3c1 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -49,7 +49,7 @@ STATISTIC(NumLCSSA, "Number of live out of a loop variables"); namespace { struct VISIBILITY_HIDDEN LCSSA : public LoopPass { static char ID; // Pass identification, replacement for typeid - LCSSA() : LoopPass((intptr_t)&ID) {} + LCSSA() : LoopPass(&ID) {} // Cached analysis information for the current function. LoopInfo *LI; diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 3267af7..af41036 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -56,7 +56,7 @@ STATISTIC(NumNested , "Number of nested loops split out"); namespace { struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass { static char ID; // Pass identification, replacement for typeid - LoopSimplify() : FunctionPass((intptr_t)&ID) {} + LoopSimplify() : FunctionPass(&ID) {} // AA - If we have an alias analysis object to update, this is it, otherwise // this is null. diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 4223c7f..792e98e 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -38,7 +38,7 @@ namespace { public: static char ID; // Pass ID, replacement for typeid explicit LowerAllocations(bool LowerToInt = false) - : BasicBlockPass((intptr_t)&ID), MallocFunc(0), FreeFunc(0), + : BasicBlockPass(&ID), MallocFunc(0), FreeFunc(0), LowerMallocArgToInteger(LowerToInt) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 0f86765..437fdbe 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -78,7 +78,7 @@ namespace { public: static char ID; // Pass identification, replacement for typeid explicit LowerInvoke(const TargetLowering *tli = NULL) - : FunctionPass((intptr_t)&ID), TLI(tli) { } + : FunctionPass(&ID), TLI(tli) { } bool doInitialization(Module &M); bool runOnFunction(Function &F); diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 99e9384..a7b1efc 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -33,7 +33,7 @@ namespace { class VISIBILITY_HIDDEN LowerSwitch : public FunctionPass { public: static char ID; // Pass identification, replacement for typeid - LowerSwitch() : FunctionPass((intptr_t) &ID) {} + LowerSwitch() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F); diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 1a936c0..2b06d77 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -28,7 +28,7 @@ STATISTIC(NumPromoted, "Number of alloca's promoted"); namespace { struct VISIBILITY_HIDDEN PromotePass : public FunctionPass { static char ID; // Pass identification, replacement for typeid - PromotePass() : FunctionPass((intptr_t)&ID) {} + PromotePass() : FunctionPass(&ID) {} // runOnFunction - To run this pass, first we calculate the alloca // instructions that are safe for promotion, then we promote each one. |