diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
commit | a79db30d284205cf27d90f9a174a7eb28c8afcb8 (patch) | |
tree | 6889329ccf26fd620cce0799a3cdf94b0acde4e3 /llvm/lib/Transforms/IPO | |
parent | 4b19157ba913903a07284ad3c066da9a7e7fc8c6 (diff) | |
download | bcm5719-llvm-a79db30d284205cf27d90f9a174a7eb28c8afcb8.tar.gz bcm5719-llvm-a79db30d284205cf27d90f9a174a7eb28c8afcb8.zip |
Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
Diffstat (limited to 'llvm/lib/Transforms/IPO')
19 files changed, 25 insertions, 25 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 5934c5ea24e..97433801da2 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp index 86cfcc4624a..b4bab2d0e7e 100644 --- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp index 5f1920b0618..ec8f1364e82 100644 --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp index 3cb658ef72f..85aed2b7915 100644 --- a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp index 03a8e5cebca..d409b6e8067 100644 --- a/llvm/lib/Transforms/IPO/ExtractGV.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp index 608705b10a0..020c70ab375 100644 --- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index f63ef46a850..f9a7c73534b 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp index 42c02e6a45c..aecec44aea0 100644 --- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/IndMemRemoval.cpp b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp index 84483748594..2e09fe967f4 100644 --- a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 38cb67dddf1..88b6afdebb7 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp index 577d69cf60b..cbfccf2a2c7 100644 --- a/llvm/lib/Transforms/IPO/Internalize.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp index 8e55b3f0919..0c654438d50 100644 --- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index 80158b43a5c..d5997fb4b51 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/PartialSpecialization.cpp b/llvm/lib/Transforms/IPO/PartialSpecialization.cpp index d39ea58ab67..949358e7bc9 100644 --- a/llvm/lib/Transforms/IPO/PartialSpecialization.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp index d4194a1060e..5e50e20af4d 100644 --- a/llvm/lib/Transforms/IPO/PruneEH.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp index daf8ef00053..a81bbdb3c53 100644 --- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp b/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp index 7db0aa8d129..a94d78e276c 100644 --- a/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp index 63e1a7beb04..6277f07de3a 100644 --- a/llvm/lib/Transforms/IPO/StripSymbols.cpp +++ b/llvm/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/llvm/lib/Transforms/IPO/StructRetPromotion.cpp b/llvm/lib/Transforms/IPO/StructRetPromotion.cpp index 2f44d80ae48..2a7de3dc491 100644 --- a/llvm/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/llvm/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); |