Tidy up several unbeseeming casts from pointer to intptr_t.
authorDan Gohman <gohman@apple.com>
Thu, 4 Sep 2008 17:05:41 +0000 (17:05 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 4 Sep 2008 17:05:41 +0000 (17:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8

137 files changed:
include/llvm/Analysis/Dominators.h
include/llvm/Analysis/FindUsedTypes.h
include/llvm/Analysis/IntervalPartition.h
include/llvm/Analysis/LoopPass.h
include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/Analysis/PostDominators.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/CallGraphSCCPass.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/LiveStackAnalysis.h
include/llvm/CodeGen/LiveVariables.h
include/llvm/CodeGen/MachineFunctionPass.h
include/llvm/Transforms/IPO/InlinerPass.h
include/llvm/Transforms/RSProfiling.h
include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/AliasAnalysisEvaluator.cpp
lib/Analysis/AliasDebugger.cpp
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/CFGPrinter.cpp
lib/Analysis/IPA/Andersens.cpp
lib/Analysis/IPA/CallGraph.cpp
lib/Analysis/IPA/CallGraphSCCPass.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/InstCount.cpp
lib/Analysis/IntervalPartition.cpp
lib/Analysis/LoopPass.cpp
lib/Analysis/ProfileInfo.cpp
lib/Analysis/ProfileInfoLoaderPass.cpp
lib/Bitcode/Writer/BitcodeWriterPass.cpp
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/ELFWriter.cpp
lib/CodeGen/GCMetadata.cpp
lib/CodeGen/GCStrategy.cpp
lib/CodeGen/IfConversion.cpp
lib/CodeGen/LoopAligner.cpp
lib/CodeGen/LowerSubregs.cpp
lib/CodeGen/MachOWriter.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/MachineLICM.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/CodeGen/MachineSink.cpp
lib/CodeGen/PHIElimination.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/RegAllocBigBlock.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/RegAllocLocal.cpp
lib/CodeGen/RegAllocSimple.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/SimpleRegisterCoalescing.h
lib/CodeGen/StackSlotColoring.cpp
lib/CodeGen/StrongPHIElimination.cpp
lib/CodeGen/TwoAddressInstructionPass.cpp
lib/CodeGen/UnreachableBlockElim.cpp
lib/Target/ARM/ARMCodeEmitter.cpp
lib/Target/ARM/ARMConstantIslandPass.cpp
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
lib/Target/Alpha/AlphaBranchSelector.cpp
lib/Target/Alpha/AlphaCodeEmitter.cpp
lib/Target/Alpha/AlphaLLRP.cpp
lib/Target/CBackend/CBackend.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Target/IA64/IA64Bundling.cpp
lib/Target/MSIL/MSILWriter.h
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/PowerPC/PPCBranchSelector.cpp
lib/Target/PowerPC/PPCCodeEmitter.cpp
lib/Target/Sparc/DelaySlotFiller.cpp
lib/Target/Sparc/FPMover.cpp
lib/Target/TargetData.cpp
lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86RegisterInfo.cpp
lib/Transforms/Hello/Hello.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/ConstantMerge.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/DeadTypeElimination.cpp
lib/Transforms/IPO/ExtractGV.cpp
lib/Transforms/IPO/GlobalDCE.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/IPConstantPropagation.cpp
lib/Transforms/IPO/IndMemRemoval.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/LoopExtractor.cpp
lib/Transforms/IPO/LowerSetJmp.cpp
lib/Transforms/IPO/PartialSpecialization.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/IPO/RaiseAllocations.cpp
lib/Transforms/IPO/StripDeadPrototypes.cpp
lib/Transforms/IPO/StripSymbols.cpp
lib/Transforms/IPO/StructRetPromotion.cpp
lib/Transforms/Instrumentation/EdgeProfiling.cpp
lib/Transforms/Instrumentation/RSProfiling.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/BasicBlockPlacement.cpp
lib/Transforms/Scalar/CodeGenPrepare.cpp
lib/Transforms/Scalar/CondPropagate.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/GVNPRE.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopDeletion.cpp
lib/Transforms/Scalar/LoopIndexSplit.cpp
lib/Transforms/Scalar/LoopRotation.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Scalar/LoopUnroll.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/MarkModRef.cpp
lib/Transforms/Scalar/MemCpyOptimizer.cpp
lib/Transforms/Scalar/PredicateSimplifier.cpp
lib/Transforms/Scalar/Reassociate.cpp
lib/Transforms/Scalar/Reg2Mem.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Scalar/SimplifyCFGPass.cpp
lib/Transforms/Scalar/SimplifyLibCalls.cpp
lib/Transforms/Scalar/TailDuplication.cpp
lib/Transforms/Scalar/TailRecursionElimination.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Utils/LCSSA.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/LowerInvoke.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp
lib/VMCore/PassManager.cpp
lib/VMCore/Verifier.cpp

index 6e944d32b366880f54e58886a4309decc08c1815..94ab04eb56bfb4c28d18dda3c630ac6a4c316ec3 100644 (file)
@@ -720,7 +720,7 @@ public:
   static char ID; // Pass ID, replacement for typeid
   DominatorTreeBase<BasicBlock>* DT;
   
-  DominatorTree() : FunctionPass(intptr_t(&ID)) {
+  DominatorTree() : FunctionPass(&ID) {
     DT = new DominatorTreeBase<BasicBlock>(false);
   }
   
@@ -911,7 +911,7 @@ protected:
   const bool IsPostDominators;
   
 public:
-  DominanceFrontierBase(intptr_t ID, bool isPostDom) 
+  DominanceFrontierBase(void *ID, bool isPostDom) 
     : FunctionPass(ID), IsPostDominators(isPostDom) {}
 
   /// getRoots -  Return the root blocks of the current CFG.  This may include
@@ -1030,7 +1030,7 @@ class DominanceFrontier : public DominanceFrontierBase {
 public:
   static char ID; // Pass ID, replacement for typeid
   DominanceFrontier() : 
-    DominanceFrontierBase(intptr_t(&ID), false) {}
+    DominanceFrontierBase(&ID, false) {}
 
   BasicBlock *getRoot() const {
     assert(Roots.size() == 1 && "Should always have entry node!");
index d3e62e269654784606fce9752e91acbb324fcd19..35e4e6f3f9e201449ef6acfb03d2f0dfcec1c2ab 100644 (file)
@@ -25,7 +25,7 @@ class FindUsedTypes : public ModulePass {
   std::set<const Type *> UsedTypes;
 public:
   static char ID; // Pass identification, replacement for typeid
-  FindUsedTypes() : ModulePass((intptr_t)&ID) {}
+  FindUsedTypes() : ModulePass(&ID) {}
 
   /// getTypes - After the pass has been run, return the set containing all of
   /// the types used in the module.
index e724681fa4935682d6a65d6838955f7bec7d86fd..feae6d82f82f5a3cfc10d891321f74ed3d92ee9a 100644 (file)
@@ -48,7 +48,7 @@ class IntervalPartition : public FunctionPass {
 public:
   static char ID; // Pass identification, replacement for typeid
 
-  IntervalPartition() : FunctionPass((intptr_t)&ID), RootInterval(0) {}
+  IntervalPartition() : FunctionPass(&ID), RootInterval(0) {}
 
   // run - Calculate the interval partition for this function
   virtual bool runOnFunction(Function &F);
index 60ad0d95190c02348ce86dd68f204b6da408bf67..af6a6177c1b05157103005beccfd438ed6f947a7 100644 (file)
@@ -30,6 +30,7 @@ class LoopPass : public Pass {
 
  public:
   explicit LoopPass(intptr_t pid) : Pass(pid) {}
+  explicit LoopPass(void *pid) : Pass(pid) {}
 
   // runOnLoop - This method should be implemented by the subclass to perform
   // whatever action is necessary for the specified Loop.
index c6ef41ff24046de932a30586bcf7ad6dc0e23dcd..c606b22acee065338fbbf95557bb6ae259537c7a 100644 (file)
@@ -66,7 +66,7 @@ class MemoryDependenceAnalysis : public FunctionPass {
     static Instruction* const Dirty;
     
     static char ID; // Class identification, replacement for typeinfo
-    MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID) {}
+    MemoryDependenceAnalysis() : FunctionPass(&ID) {}
 
     /// Pass Implementation stuff.  This doesn't do any analysis.
     ///
index b99fafcfc9f26ec4d980427e5d7f4a7016fdcbbc..cd6af74024a547adabce9e2ccbad3e6f183abddb 100644 (file)
@@ -25,7 +25,7 @@ struct PostDominatorTree : public FunctionPass {
   static char ID; // Pass identification, replacement for typeid
   DominatorTreeBase<BasicBlock>* DT;
 
-  PostDominatorTree() : FunctionPass((intptr_t)&ID) {
+  PostDominatorTree() : FunctionPass(&ID) {
     DT = new DominatorTreeBase<BasicBlock>(true);
   }
 
@@ -70,7 +70,7 @@ FunctionPass* createPostDomTree();
 struct PostDominanceFrontier : public DominanceFrontierBase {
   static char ID;
   PostDominanceFrontier() 
-    : DominanceFrontierBase((intptr_t) &ID, true) {}
+    : DominanceFrontierBase(&ID, true) {}
 
   virtual bool runOnFunction(Function &) {
     Frontiers.clear();
index e5b10c9d59a79f9e24c32e8cfb195d156bf3136f..e16e990bad2d7a5a024344acf72c29de6c44bccb 100644 (file)
@@ -191,7 +191,7 @@ namespace llvm {
     void *Impl;    // ScalarEvolution uses the pimpl pattern
   public:
     static char ID; // Pass identification, replacement for typeid
-    ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {}
+    ScalarEvolution() : FunctionPass(&ID), Impl(0) {}
 
     /// getSCEV - Return a SCEV expression handle for the full generality of the
     /// specified expression.
index 26005059dee5aaa765d5ce1d5eb5cb8ea99992c2..d5ff17cf247c03f0e2914c3cac81cfc99cfcbfb7 100644 (file)
@@ -32,6 +32,7 @@ class PMStack;
 struct CallGraphSCCPass : public Pass {
 
   explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
+  explicit CallGraphSCCPass(void *pid) : Pass(pid) {}
 
   /// doInitialization - This method is called before the SCC's of the program
   /// has been processed, allowing the pass to do initialization as necessary.
index a43c2d4b982fcc98e3b30387f1861d55126959d4..c77513ca98649891d839603c9339431d988c07ea 100644 (file)
@@ -94,7 +94,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {}
+    LiveIntervals() : MachineFunctionPass(&ID) {}
 
     struct InstrSlots {
       enum {
index 87ed67fa0000ff06c333684dad021fe0ad93db23..5c88bb83c5292dc3ed51f800ca71bd5d905e444e 100644 (file)
@@ -35,7 +35,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    LiveStacks() : MachineFunctionPass((intptr_t)&ID) {}
+    LiveStacks() : MachineFunctionPass(&ID) {}
 
     typedef SS2IntervalMap::iterator iterator;
     typedef SS2IntervalMap::const_iterator const_iterator;
index e2bed5c2ef992df242623fad1e52704cad55ea22..18fa6f1f02b825dbb46a760158930286abec8d70 100644 (file)
@@ -43,7 +43,7 @@ class TargetRegisterInfo;
 class LiveVariables : public MachineFunctionPass {
 public:
   static char ID; // Pass identification, replacement for typeid
-  LiveVariables() : MachineFunctionPass((intptr_t)&ID) {}
+  LiveVariables() : MachineFunctionPass(&ID) {}
 
   /// VarInfo - This represents the regions where a virtual register is live in
   /// the program.  We represent this with three different pieces of
index a72563fb0af5fdfca6b4b81be4cb47e82e6b321a..95bb2bf510d52c0cfae8e8c9418b8dea285d1be7 100644 (file)
@@ -27,6 +27,7 @@ namespace llvm {
 struct MachineFunctionPass : public FunctionPass {
 
   explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+  explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
 
 protected:
   /// runOnMachineFunction - This method must be overloaded to perform the
index d34641def09b09f8fde8d7376c943ebe09e7c549..e0a3d2943e5633b42c15b1ea04313be28c33fb1e 100644 (file)
@@ -26,8 +26,8 @@ namespace llvm {
 /// perform the inlining operations that does not depend on the policy.
 ///
 struct Inliner : public CallGraphSCCPass {
-  explicit Inliner(const void *ID);
-  explicit Inliner(const void *ID, int Threshold);
+  explicit Inliner(void *ID);
+  explicit Inliner(void *ID, int Threshold);
 
   /// getAnalysisUsage - For this class, we declare that we require and preserve
   /// the call graph.  If the derived class implements this method, it should
index b44a992bd3dc92dbbbb0b79eee2c35370e2d27dd..98ec396a26a0350da9e63d1c45b055c24fc964a8 100644 (file)
@@ -27,7 +27,7 @@ namespace llvm {
   /// multiple profilers can be support simultaniously.
   struct RSProfilers : public ModulePass {
     static char ID; // Pass identification, replacement for typeinfo
-    RSProfilers() : ModulePass((intptr_t)&ID) {}
+    RSProfilers() : ModulePass(&ID) {}
 
     /// isProfiling - This method returns true if the value passed it was 
     /// inserted by the profiler.
index 598adfc0bce01bf6a940f9cdc0869b1451ee35db..c2d09935e76cff77f522e1e0f984f011afc88c4d 100644 (file)
@@ -26,7 +26,7 @@ struct UnifyFunctionExitNodes : public FunctionPass {
   BasicBlock *ReturnBlock, *UnwindBlock, *UnreachableBlock;
 public:
   static char ID; // Pass identification, replacement for typeid
-  UnifyFunctionExitNodes() : FunctionPass((intptr_t)&ID),
+  UnifyFunctionExitNodes() : FunctionPass(&ID),
                              ReturnBlock(0), UnwindBlock(0) {}
 
   // We can preserve non-critical-edgeness when we unify function exit nodes
index de40ad8deef2a29896ec4782b238391dc843f166..4362d7d301a80ed8bdd943f30debdfab761ed7b6 100644 (file)
@@ -35,7 +35,7 @@ namespace {
     Module *M;
   public:
     static char ID; // Class identification, replacement for typeinfo
-    AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
+    AliasAnalysisCounter() : ModulePass(&ID) {
       No = May = Must = 0;
       NoMR = JustRef = JustMod = MR = 0;
     }
index af15d0f4adf53c0662be29e4b26f05e827edd0bf..c7a86d3506fc3e92a9dadf80409692f2aa3111a8 100644 (file)
@@ -52,7 +52,7 @@ namespace {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    AAEval() : FunctionPass((intptr_t)&ID) {}
+    AAEval() : FunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<AliasAnalysis>();
index 06a43b11dd5d3d04efc1edb3bc785786fca22147..0bbd739351fe9c29751d77d396d97880f6e69b57 100644 (file)
@@ -41,7 +41,7 @@ namespace {
     
   public:
     static char ID; // Class identification, replacement for typeinfo
-    AliasDebugger() : ModulePass((intptr_t)&ID) {}
+    AliasDebugger() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class
index 398bf5aca5b4371ee5251711611e37466856b059..608da93f5738a4725f007ae5eca87d3090b940a3 100644 (file)
@@ -564,7 +564,7 @@ namespace {
     AliasSetTracker *Tracker;
   public:
     static char ID; // Pass identification, replacement for typeid
-    AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
+    AliasSetPrinter() : FunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
index b417a484760ccedded80257582d0961cd3eda349..7d4309353a40d046837eb9d2eeb738511a209d1f 100644 (file)
@@ -208,8 +208,8 @@ namespace {
   ///
   struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
     static char ID; // Class identification, replacement for typeinfo
-    NoAA() : ImmutablePass((intptr_t)&ID) {}
-    explicit NoAA(intptr_t PID) : ImmutablePass(PID) { }
+    NoAA() : ImmutablePass(&ID) {}
+    explicit NoAA(void *PID) : ImmutablePass(PID) { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<TargetData>();
@@ -269,7 +269,7 @@ namespace {
   /// derives from the NoAA class.
   struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
     static char ID; // Class identification, replacement for typeinfo
-    BasicAliasAnalysis() : NoAA((intptr_t)&ID) { }
+    BasicAliasAnalysis() : NoAA(&ID) {}
     AliasResult alias(const Value *V1, unsigned V1Size,
                       const Value *V2, unsigned V2Size);
 
index e20a0a2f876ffb43a46387f061b060591f8af5ab..46d3930bd6764baccce2d3c612b121bca012c5a7 100644 (file)
@@ -92,7 +92,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
 namespace {
   struct VISIBILITY_HIDDEN CFGViewer : public FunctionPass {
     static char ID; // Pass identifcation, replacement for typeid
-    CFGViewer() : FunctionPass((intptr_t)&ID) {}
+    CFGViewer() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       F.viewCFG();
@@ -114,7 +114,7 @@ V0("view-cfg", "View CFG of function", false, true);
 namespace {
   struct VISIBILITY_HIDDEN CFGOnlyViewer : public FunctionPass {
     static char ID; // Pass identifcation, replacement for typeid
-    CFGOnlyViewer() : FunctionPass((intptr_t)&ID) {}
+    CFGOnlyViewer() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F) {
       CFGOnly = true;
@@ -139,8 +139,8 @@ V1("view-cfg-only",
 namespace {
   struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    CFGPrinter() : FunctionPass((intptr_t)&ID) {}
-    explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
+    CFGPrinter() : FunctionPass(&ID) {}
+    explicit CFGPrinter(void *pid) : FunctionPass(pid) {}
 
     virtual bool runOnFunction(Function &F) {
       std::string Filename = "cfg." + F.getName() + ".dot";
@@ -170,7 +170,7 @@ P1("print-cfg", "Print CFG of function to 'dot' file", false, true);
 namespace {
   struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
     static char ID; // Pass identification, replacement for typeid
-    CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
+    CFGOnlyPrinter() : CFGPrinter(&ID) {}
     virtual bool runOnFunction(Function &F) {
       bool OldCFGOnly = CFGOnly;
       CFGOnly = true;
index c6075e1c6106c2c799af952ddaf17c9ad5c468ca..9e07189a77dd4ad156a2b6f94c103738a6f56a91 100644 (file)
@@ -431,7 +431,7 @@ namespace {
 
   public:
     static char ID;
-    Andersens() : ModulePass((intptr_t)&ID) {}
+    Andersens() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);
index 19d0fd5190798068df7626d1b8d1c6aceb7a9d7a..5616ee9a4b034ece5fbaa82bd3b6b435fed04f56 100644 (file)
@@ -50,7 +50,7 @@ class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass {
 
 public:
   static char ID; // Class identification, replacement for typeinfo
-  BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0), 
+  BasicCallGraph() : ModulePass(&ID), Root(0), 
     ExternalCallingNode(0), CallsExternalNode(0) {}
 
   // runOnModule - Compute the call graph for the specified module.
index 4a0e4cfe057d5413d1aca3c0f9cb5a9bcd3958d7..b8343cf4ce8c39a9515aa9f2dfafc0c983ee904a 100644 (file)
@@ -34,7 +34,7 @@ class CGPassManager : public ModulePass, public PMDataManager {
 public:
   static char ID;
   explicit CGPassManager(int Depth) 
-    : ModulePass((intptr_t)&ID), PMDataManager(Depth) { }
+    : ModulePass(&ID), PMDataManager(Depth) { }
 
   /// run - Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the module, and if so, return true.
index 9a7580b9c8df29af5f040363d1f559913672e4a1..3583f8db4f31446f25478b80a6379d676240a6d3 100644 (file)
@@ -88,7 +88,7 @@ namespace {
 
   public:
     static char ID;
-    GlobalsModRef() : ModulePass((intptr_t)&ID) {}
+    GlobalsModRef() : ModulePass(&ID) {}
 
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class
index 5f33a60e6fd39c499af10c2e0e078941a1daf9cc..2dea7b3ef6878d839d6a93ddc1951a55b46398e8 100644 (file)
@@ -52,7 +52,7 @@ namespace {
     }
   public:
     static char ID; // Pass identification, replacement for typeid
-    InstCount() : FunctionPass((intptr_t)&ID) {}
+    InstCount() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F);
 
index adb6e9df24fefd8cd8190c8f299141ef8e684190..cb8a85da552a39d93ab9ca777e75cc113f923def 100644 (file)
@@ -91,7 +91,7 @@ bool IntervalPartition::runOnFunction(Function &F) {
 // distinguish it from a copy constructor.  Always pass in false for now.
 //
 IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
-  : FunctionPass((intptr_t) &ID) {
+  : FunctionPass(&ID) {
   assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!");
 
   // Pass false to intervals_begin because we take ownership of it's memory
index b9e5f99f07c52f1aef1aa1e237c94487551df25e..7ebd4d39427bd171e55a9a22b5f6e4a6806e0299 100644 (file)
@@ -25,7 +25,7 @@ char LPPassManager::ID = 0;
 /// LPPassManager manages FPPassManagers and CalLGraphSCCPasses.
 
 LPPassManager::LPPassManager(int Depth) 
-  : FunctionPass((intptr_t)&ID), PMDataManager(Depth) { 
+  : FunctionPass(&ID), PMDataManager(Depth) { 
   skipThisLoop = false;
   redoThisLoop = false;
   LI = NULL;
index 047491baeeeb5ef729b6f148c92409fa4f8b1a5a..a0965b66da81526f61212d0a584d706a11915716 100644 (file)
@@ -85,7 +85,7 @@ namespace {
   struct VISIBILITY_HIDDEN NoProfileInfo 
     : public ImmutablePass, public ProfileInfo {
     static char ID; // Class identification, replacement for typeinfo
-    NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
+    NoProfileInfo() : ImmutablePass(&ID) {}
   };
 }  // End of anonymous namespace
 
index b2fa9e45e71759d85979c8794a2cc0165fc90b40..0a8a87bd0f97aaf5e64f1f8f42bb7e5dd2527d6a 100644 (file)
@@ -34,7 +34,7 @@ namespace {
   public:
     static char ID; // Class identification, replacement for typeinfo
     explicit LoaderPass(const std::string &filename = "")
-      : ModulePass((intptr_t)&ID), Filename(filename) {
+      : ModulePass(&ID), Filename(filename) {
       if (filename.empty()) Filename = ProfileInfoFilename;
     }
 
index 522060e78e714125af7437c9a4e8aba7bb452857..dd16fabbd7ad570112ed1d3731eecb512bcfaf56 100644 (file)
@@ -21,7 +21,7 @@ namespace {
   public:
     static char ID; // Pass identifcation, replacement for typeid
     explicit WriteBitcodePass(std::ostream &o)
-      : ModulePass((intptr_t) &ID), Out(o) {}
+      : ModulePass(&ID), Out(o) {}
     
     const char *getPassName() const { return "Bitcode Writer"; }
     
index a720f04a9ae4f6a52d3f2b15a66b2740aa19cd3c..03a61d42cd16d52d10ecbc8367f156b3b2b2481d 100644 (file)
@@ -37,7 +37,7 @@ using namespace llvm;
 char AsmPrinter::ID = 0;
 AsmPrinter::AsmPrinter(raw_ostream &o, TargetMachine &tm,
                        const TargetAsmInfo *T)
-  : MachineFunctionPass((intptr_t)&ID), FunctionNumber(0), O(o),
+  : MachineFunctionPass(&ID), FunctionNumber(0), O(o),
     TM(tm), TAI(T), TRI(tm.getRegisterInfo()),
     IsInTextSection(false)
 {}
index 2ccfd191a093eba3b34abe56b3c2c3e8f8ca16ae..11866a151841a5c1c8925025624ce8d76d3ad7ea 100644 (file)
@@ -48,7 +48,7 @@ namespace {
   struct VISIBILITY_HIDDEN BranchFolder : public MachineFunctionPass {
     static char ID;
     explicit BranchFolder(bool defaultEnableTailMerge) : 
-        MachineFunctionPass((intptr_t)&ID) {
+        MachineFunctionPass(&ID) {
           switch (FlagEnableTailMerge) {
           case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break;
           case cl::BOU_TRUE: EnableTailMerge = true; break;
index 6f29112caf45d63280736e42bb1fc7c0054219e5..0b6e0b1b1031ecfda853ff7f26adb5f13e42e83b 100644 (file)
@@ -195,7 +195,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) {
 //===----------------------------------------------------------------------===//
 
 ELFWriter::ELFWriter(raw_ostream &o, TargetMachine &tm) 
-  : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
+  : MachineFunctionPass(&ID), O(o), TM(tm) {
   e_flags = 0;    // e_flags defaults to 0, no flags.
 
   is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
index efb89e128e4d1aa99c2d87d73a4338adb04ce609..f2978f88882ce6b778bd5cb37768ce8b89924e0e 100644 (file)
@@ -66,7 +66,7 @@ GCFunctionInfo::~GCFunctionInfo() {}
 char GCModuleInfo::ID = 0;
 
 GCModuleInfo::GCModuleInfo()
-  : ImmutablePass((intptr_t)&ID) {}
+  : ImmutablePass(&ID) {}
 
 GCModuleInfo::~GCModuleInfo() {
   clear();
index d46b5256870a2249a2b510eaee8017a74ec2ce38..517b3a7762e7e3c70ff2f542bf42b46907fa276b 100644 (file)
@@ -127,7 +127,7 @@ FunctionPass *llvm::createGCLoweringPass() {
 char LowerIntrinsics::ID = 0;
 
 LowerIntrinsics::LowerIntrinsics()
-  : FunctionPass((intptr_t)&ID) {}
+  : FunctionPass(&ID) {}
 
 const char *LowerIntrinsics::getPassName() const {
   return "Lower Garbage Collection Instructions";
index 079b701648020b69b4c3da673dc6714fe9c46648..38fce9b435c550b6bafab20d695b1cfb8803c1cd 100644 (file)
@@ -146,7 +146,7 @@ namespace {
     bool MadeChange;
   public:
     static char ID;
-    IfConverter() : MachineFunctionPass((intptr_t)&ID) {}
+    IfConverter() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
     virtual const char *getPassName() const { return "If Converter"; }
index 44f5bb461dc0650927e49d7decf45c18a3de8981..51c635661f214cd152e114a248a97d9923f1b597 100644 (file)
@@ -26,7 +26,7 @@ namespace {
   class LoopAligner : public MachineFunctionPass {
   public:
     static char ID;
-    LoopAligner() : MachineFunctionPass((intptr_t)&ID) {}
+    LoopAligner() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
     virtual const char *getPassName() const { return "Loop aligner"; }
index 90bd595d7a54877a0b2da3253fbc24102b725e7a..6e115ddb137ac358ea6cd7a3d903bb41ea8c0293 100644 (file)
@@ -24,7 +24,7 @@ namespace {
   struct VISIBILITY_HIDDEN LowerSubregsInstructionPass
    : public MachineFunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    LowerSubregsInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
+    LowerSubregsInstructionPass() : MachineFunctionPass(&ID) {}
     
     const char *getPassName() const {
       return "Subregister lowering instruction pass";
index 9f1cb00ca70baab7610ebe3e385701ddb4750e96..253c5ca5f4609337f4fdb1762b97880ede0ce806 100644 (file)
@@ -336,7 +336,7 @@ void MachOCodeEmitter::emitJumpTables(MachineJumpTableInfo *MJTI) {
 
 char MachOWriter::ID = 0;
 MachOWriter::MachOWriter(raw_ostream &o, TargetMachine &tm) 
-  : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
+  : MachineFunctionPass(&ID), O(o), TM(tm) {
   is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
   isLittleEndian = TM.getTargetData()->isLittleEndian();
 
index ae97d890db50ef3d2cde1a7d4196c4f496340278..5aade03031e6191ed5a752512cb134a89eaab180 100644 (file)
@@ -49,7 +49,7 @@ namespace {
     const std::string Banner;
 
     Printer (std::ostream *os, const std::string &banner) 
-      : MachineFunctionPass((intptr_t)&ID), OS(os), Banner(banner) {}
+      : MachineFunctionPass(&ID), OS(os), Banner(banner) {}
 
     const char *getPassName() const { return "MachineFunction Printer"; }
 
@@ -77,7 +77,7 @@ FunctionPass *llvm::createMachineFunctionPrinterPass(std::ostream *OS,
 namespace {
   struct VISIBILITY_HIDDEN Deleter : public MachineFunctionPass {
     static char ID;
-    Deleter() : MachineFunctionPass((intptr_t)&ID) {}
+    Deleter() : MachineFunctionPass(&ID) {}
 
     const char *getPassName() const { return "Machine Code Deleter"; }
 
index 709234753d40cc8cd0d911918c652377e2089265..723811932fa8fcbf2f28631f89996a5668f342d2 100644 (file)
@@ -45,7 +45,7 @@ namespace {
     MachineLoop *CurLoop;          // The current loop we are working on.
   public:
     static char ID; // Pass identification, replacement for typeid
-    MachineLICM() : MachineFunctionPass((intptr_t)&ID) {}
+    MachineLICM() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
 
index 2010d17f856ccc76206e02d2027e0c261105e575..69f8d3c014c852c9192f5a981579bce937c90029 100644 (file)
@@ -1612,7 +1612,7 @@ DebugScope::~DebugScope() {
 //===----------------------------------------------------------------------===//
 
 MachineModuleInfo::MachineModuleInfo()
-: ImmutablePass((intptr_t)&ID)
+: ImmutablePass(&ID)
 , DR()
 , VR()
 , CompileUnits()
@@ -2011,7 +2011,7 @@ namespace llvm {
 
 struct DebugLabelFolder : public MachineFunctionPass {
   static char ID;
-  DebugLabelFolder() : MachineFunctionPass((intptr_t)&ID) {}
+  DebugLabelFolder() : MachineFunctionPass(&ID) {}
 
   virtual bool runOnMachineFunction(MachineFunction &MF);
   virtual const char *getPassName() const { return "Label Folder"; }
index b4e72fed28db8c793b6a627b417ad87a27d56315..0f608d637c537a7fd4c1afab8e111c33ff441393 100644 (file)
@@ -36,7 +36,7 @@ namespace {
 
   public:
     static char ID; // Pass identification
-    MachineSinking() : MachineFunctionPass((intptr_t)&ID) {}
+    MachineSinking() : MachineFunctionPass(&ID) {}
     
     virtual bool runOnMachineFunction(MachineFunction &MF);
     
index ceba842970d3005e474a3bec805546065b7643c9..bd389db31f3abcaf23b77759c17446e7c04b89cf 100644 (file)
@@ -38,7 +38,7 @@ namespace {
 
   public:
     static char ID; // Pass identification, replacement for typeid
-    PNE() : MachineFunctionPass((intptr_t)&ID) {}
+    PNE() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
     
index 8c9776e07a945c6574e61ac80cda4c7285c1211e..41981d3ff145d922237d31b340d36750358f19ba 100644 (file)
@@ -29,7 +29,7 @@ namespace {
   class VISIBILITY_HIDDEN SchedulePostRATDList : public MachineFunctionPass {
   public:
     static char ID;
-    SchedulePostRATDList() : MachineFunctionPass((intptr_t)&ID) {}
+    SchedulePostRATDList() : MachineFunctionPass(&ID) {}
   private:
     MachineFunction *MF;
     const TargetMachine *TM;
index be8a54e03d1c60923fac4c8c1289901cf573fb13..51d3698dc58f7247fa682e1a4c4a8f24b08e08ae 100644 (file)
@@ -35,7 +35,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN PEI : public MachineFunctionPass {
     static char ID;
-    PEI() : MachineFunctionPass((intptr_t)&ID) {}
+    PEI() : MachineFunctionPass(&ID) {}
 
     const char *getPassName() const {
       return "Prolog/Epilog Insertion & Frame Finalization";
index 215f9430997ea6ef137307153f2dba495a3cdbee..380ad059cf62e07f77d0e91416ba48e7604e7776 100644 (file)
@@ -82,7 +82,7 @@ namespace {
   class VISIBILITY_HIDDEN RABigBlock : public MachineFunctionPass {
   public:
     static char ID;
-    RABigBlock() : MachineFunctionPass((intptr_t)&ID) {}
+    RABigBlock() : MachineFunctionPass(&ID) {}
   private:
     /// TM - For getting at TargetMachine info 
     ///
index c6f714a9cb7d59bb21505e4852faacd929327027..91dda771475964ce38f0098fa1ccfc7fb99545cf 100644 (file)
@@ -55,7 +55,7 @@ linearscanRegAlloc("linearscan", "  linear scan register allocator",
 namespace {
   struct VISIBILITY_HIDDEN RALinScan : public MachineFunctionPass {
     static char ID;
-    RALinScan() : MachineFunctionPass((intptr_t)&ID) {}
+    RALinScan() : MachineFunctionPass(&ID) {}
 
     typedef std::pair<LiveInterval*, LiveInterval::iterator> IntervalPtr;
     typedef SmallVector<IntervalPtr, 32> IntervalPtrs;
index 5946e74902205486f2f84af8b33efeb8a5a4f3d4..d66031776e3d7370be390b28967acf0cb1f1c1e5 100644 (file)
@@ -44,8 +44,7 @@ namespace {
   class VISIBILITY_HIDDEN RALocal : public MachineFunctionPass {
   public:
     static char ID;
-    RALocal() : MachineFunctionPass((intptr_t)&ID),
-      StackSlotForVirtReg(-1) {}
+    RALocal() : MachineFunctionPass(&ID), StackSlotForVirtReg(-1) {}
   private:
     const TargetMachine *TM;
     MachineFunction *MF;
index 9ad38405ae77eaf067976c2aecdfac114cdcef38..87b09a2a0dceaf6d753b38df0b0ffb68378032df 100644 (file)
@@ -41,7 +41,7 @@ namespace {
   class VISIBILITY_HIDDEN RegAllocSimple : public MachineFunctionPass {
   public:
     static char ID;
-    RegAllocSimple() : MachineFunctionPass((intptr_t)&ID) {}
+    RegAllocSimple() : MachineFunctionPass(&ID) {}
   private:
     MachineFunction *MF;
     const TargetMachine *TM;
index 2b9ba38f20c0a675ba77255c35ab4aab7657acd4..b4ba64ea2798950082e8740e38d61f1f58a99eae 100644 (file)
@@ -158,7 +158,7 @@ MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
 //===----------------------------------------------------------------------===//
 
 SelectionDAGISel::SelectionDAGISel(TargetLowering &tli, bool fast) :
-  FunctionPass((intptr_t)&ID), TLI(tli),
+  FunctionPass(&ID), TLI(tli),
   FuncInfo(new FunctionLoweringInfo(TLI)),
   CurDAG(new SelectionDAG(TLI, *FuncInfo)),
   SDL(new SelectionDAGLowering(*CurDAG, TLI, *FuncInfo)),
index 62738952aa2ce5b7304fa08e710095b373e1b092..41d1dfb20b011ba04758103a0903c6af191bde49 100644 (file)
@@ -102,7 +102,7 @@ namespace llvm {
 
   public:
     static char ID; // Pass identifcation, replacement for typeid
-    SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {}
+    SimpleRegisterCoalescing() : MachineFunctionPass(&ID) {}
 
     struct InstrSlots {
       enum {
index 6d0e2148c59b1dc3f62e20048572e6546bf9a11c..ab980a14ec6454866691d9f7c9ddcc3f124fde80 100644 (file)
@@ -62,7 +62,7 @@ namespace {
 
   public:
     static char ID; // Pass identification
-    StackSlotColoring() : MachineFunctionPass((intptr_t)&ID), NextColor(-1) {}
+    StackSlotColoring() : MachineFunctionPass(&ID), NextColor(-1) {}
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<LiveStacks>();
index 9f59417b5dc0e05dec1315204806c02baed4b40b..ebe0c01aab998bcadae210bfac8b6e98bebb17df 100644 (file)
@@ -38,7 +38,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN StrongPHIElimination : public MachineFunctionPass {
     static char ID; // Pass identification, replacement for typeid
-    StrongPHIElimination() : MachineFunctionPass((intptr_t)&ID) {}
+    StrongPHIElimination() : MachineFunctionPass(&ID) {}
 
     // Waiting stores, for each MBB, the set of copies that need to
     // be inserted into that MBB
index 51a3c5f52ed99c5e8a4f44f652e56f17b6652f85..16b57a02b61eb45556310316f87dcd8e441ff072 100644 (file)
@@ -70,7 +70,7 @@ namespace {
                              DenseMap<MachineInstr*, unsigned> &DistanceMap);
   public:
     static char ID; // Pass identification, replacement for typeid
-    TwoAddressInstructionPass() : MachineFunctionPass((intptr_t)&ID) {}
+    TwoAddressInstructionPass() : MachineFunctionPass(&ID) {}
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addPreserved<LiveVariables>();
index 7bf95bf96e55b1ee2942236d1019ab1360c4c807..3c3fca51b66f27931e640b39b7f0f87d2572a16a 100644 (file)
@@ -40,7 +40,7 @@ namespace {
     virtual bool runOnFunction(Function &F);
   public:
     static char ID; // Pass identification, replacement for typeid
-    UnreachableBlockElim() : FunctionPass((intptr_t)&ID) {}
+    UnreachableBlockElim() : FunctionPass(&ID) {}
   };
 }
 char UnreachableBlockElim::ID = 0;
@@ -90,7 +90,7 @@ namespace {
     
   public:
     static char ID; // Pass identification, replacement for typeid
-    UnreachableMachineBlockElim() : MachineFunctionPass((intptr_t)&ID) {}
+    UnreachableMachineBlockElim() : MachineFunctionPass(&ID) {}
   };
 }
 char UnreachableMachineBlockElim::ID = 0;
index 16b00417b35d3f5db84a3b7e66e33fafe3df4435..80f68984a5e2d4e307addc38902e321110f71061 100644 (file)
@@ -39,11 +39,11 @@ namespace {
   public:
     static char ID;
     explicit ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm),
+      : MachineFunctionPass(&ID), II(0), TD(0), TM(tm),
       MCE(mce) {}
     ARMCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
             const ARMInstrInfo &ii, const TargetData &td)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm),
+      : MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm),
       MCE(mce) {}
 
     bool runOnMachineFunction(MachineFunction &MF);
index f577de5b3652e0e671cc51e6b611b9a97e285d43..73c56182a1890312d13a46e2c7dee58a3ec8a6fd 100644 (file)
@@ -129,7 +129,7 @@ namespace {
     bool isThumb;
   public:
     static char ID;
-    ARMConstantIslands() : MachineFunctionPass((intptr_t)&ID) {}
+    ARMConstantIslands() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 
index 5eeeafbac1cc12cc53a82352a2e531d1294ebef1..8bd4caa6fd6360977da263c7046b570af4ae0e5c 100644 (file)
@@ -39,7 +39,7 @@ STATISTIC(NumFSTMGened, "Number of fstm instructions generated");
 namespace {
   struct VISIBILITY_HIDDEN ARMLoadStoreOpt : public MachineFunctionPass {
     static char ID;
-    ARMLoadStoreOpt() : MachineFunctionPass((intptr_t)&ID) {}
+    ARMLoadStoreOpt() : MachineFunctionPass(&ID) {}
 
     const TargetInstrInfo *TII;
     const TargetRegisterInfo *TRI;
index f1d60c836f7be437a6a6e179b480216aeb213515..aca8ca73489783e5634b46a4c55c82b87a79764f 100644 (file)
@@ -23,7 +23,7 @@ using namespace llvm;
 namespace {
   struct VISIBILITY_HIDDEN AlphaBSel : public MachineFunctionPass {
     static char ID;
-    AlphaBSel() : MachineFunctionPass((intptr_t)&ID) {}
+    AlphaBSel() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
 
index 40e14135a40a04f0845be931a507f854d4089519..b51440932f7964f21486ffae7efa970842ae6c35 100644 (file)
@@ -39,10 +39,10 @@ namespace {
   public:
     static char ID;
     explicit AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TM(tm), MCE(mce) {}
+      : MachineFunctionPass(&ID), II(0), TM(tm), MCE(mce) {}
     AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce,
                      const AlphaInstrInfo& ii)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TM(tm), MCE(mce) {}
+      : MachineFunctionPass(&ID), II(&ii), TM(tm), MCE(mce) {}
 
     bool runOnMachineFunction(MachineFunction &MF);
 
index f4dd199d3540f73c6717abd151dd691cb60fdc0a..7a1b78497b829775e7a83ee2b3d0327faf37bb3e 100644 (file)
@@ -39,7 +39,7 @@ namespace {
 
     static char ID;
     AlphaLLRPPass(AlphaTargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Alpha NOP inserter";
index 456bda34e733b8aee7d44631282bc67c3105dfb0..a1222daf3f20174a7173bf3050d770a0fbb58328 100644 (file)
@@ -60,7 +60,7 @@ namespace {
   public:
     static char ID;
     CBackendNameAllUsedStructsAndMergeFunctions() 
-      : ModulePass((intptr_t)&ID) {}
+      : ModulePass(&ID) {}
     void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<FindUsedTypes>();
     }
@@ -92,7 +92,7 @@ namespace {
   public:
     static char ID;
     explicit CWriter(raw_ostream &o)
-      : FunctionPass((intptr_t)&ID), Out(o), IL(0), Mang(0), LI(0), 
+      : FunctionPass(&ID), Out(o), IL(0), Mang(0), LI(0), 
         TheModule(0), TAsm(0), TD(0) {}
 
     virtual const char *getPassName() const { return "C backend"; }
index 33326e14d0c4671d765f1894be2e65e4c97a1d96..b39d77493207ef6aab22f3339614879b3120db55 100644 (file)
@@ -103,7 +103,7 @@ namespace {
   public:
     static char ID;
     explicit CppWriter(raw_ostream &o) :
-      ModulePass((intptr_t)&ID), Out(o), uniqueNum(0), is_inline(false) {}
+      ModulePass(&ID), Out(o), uniqueNum(0), is_inline(false) {}
 
     virtual const char *getPassName() const { return "C++ backend"; }
 
index cac007cef26551d3946a9d231548f99bc6f9d0c1..c5bc83e134b2beebb7d5ff9aa067034610eb1792 100644 (file)
@@ -43,7 +43,7 @@ namespace {
     IA64TargetMachine &TM;
 
     IA64BundlingPass(IA64TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "IA64 (Itanium) Bundling Pass";
index b141e23d64cf89898fd06ec0824bd390557326ab..c64ceeeff5945648c794ac42b09ebe19247f5a1a 100644 (file)
@@ -42,7 +42,7 @@ namespace {
     static char ID;
     MSILModule(const std::set<const Type *>*& _UsedTypes,
                const TargetData*& _TD)
-      : ModulePass((intptr_t)&ID), UsedTypes(_UsedTypes), TD(_TD) {}
+      : ModulePass(&ID), UsedTypes(_UsedTypes), TD(_TD) {}
 
     void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<FindUsedTypes>();
@@ -86,7 +86,7 @@ namespace {
       StaticInitList;
     const std::set<const Type *>* UsedTypes;
     static char ID;
-    MSILWriter(raw_ostream &o) : FunctionPass((intptr_t)&ID), Out(o) {
+    MSILWriter(raw_ostream &o) : FunctionPass(&ID), Out(o) {
       UniqID = 0;
     }
 
index 881cd12929011cdbacd94202d60fd0aaf6ad5f9d..4825b29d7115885bab57a2dff1b92494c09a3148 100644 (file)
@@ -32,7 +32,7 @@ namespace {
 
     static char ID;
     Filler(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
+      : MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
 
     virtual const char *getPassName() const {
       return "Mips Delay Slot Filler";
index ab988ba823ee8125fb5c0cb10360864bedc8d2eb..2fc5b3c025a15864781cbcde7824cf848101f023 100644 (file)
@@ -32,7 +32,7 @@ STATISTIC(NumExpanded, "Number of branches expanded to long format");
 namespace {
   struct VISIBILITY_HIDDEN PPCBSel : public MachineFunctionPass {
     static char ID;
-    PPCBSel() : MachineFunctionPass((intptr_t)&ID) {}
+    PPCBSel() : MachineFunctionPass(&ID) {}
 
     /// BlockSizes - The sizes of the basic blocks in the function.
     std::vector<unsigned> BlockSizes;
index 3326cf7f16d108450515c6f76c72308f98c9a7be..a77c7266857a65cb200677e15db16c480235cfce 100644 (file)
@@ -48,7 +48,7 @@ namespace {
   public:
     static char ID;
     PPCCodeEmitter(TargetMachine &T, MachineCodeEmitter &M)
-      : MachineFunctionPass((intptr_t)&ID), TM(T), MCE(M) {}
+      : MachineFunctionPass(&ID), TM(T), MCE(M) {}
 
     const char *getPassName() const { return "PowerPC Machine Code Emitter"; }
 
index 818573253f0427c68f9022421791b3fe74b82277..f6648a87005854c1a284b1323decc01c491def5d 100644 (file)
@@ -32,7 +32,7 @@ namespace {
 
     static char ID;
     Filler(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
+      : MachineFunctionPass(&ID), TM(tm), TII(tm.getInstrInfo()) { }
 
     virtual const char *getPassName() const {
       return "SPARC Delay Slot Filler";
index 016215b9717dbb6329242fee558461c9ee291b05..a542fc5198c6516599a270b3a893e991e0fb24c4 100644 (file)
@@ -34,7 +34,7 @@ namespace {
     
     static char ID;
     FPMover(TargetMachine &tm) 
-      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
+      : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Sparc Double-FP Move Fixer";
index f83adefbee3426e2124a3c093aef21a6d274db9e..650f91eee1be21eff9ebd35d9991499c6ddb31f9 100644 (file)
@@ -232,7 +232,7 @@ void TargetData::init(const std::string &TargetDescription) {
 }
 
 TargetData::TargetData(const Module *M) 
-  : ImmutablePass((intptr_t)&ID) {
+  : ImmutablePass(&ID) {
   init(M->getDataLayout());
 }
 
index c3a1ed921a7c090aaa4bb1dfcd65ea578704a6a1..1c81b4b6fc042755d247736b090882da949725b9 100644 (file)
@@ -46,12 +46,12 @@ namespace {
   public:
     static char ID;
     explicit Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce)
-      : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm), 
+      : MachineFunctionPass(&ID), II(0), TD(0), TM(tm), 
       MCE(mce), PICBaseOffset(0), Is64BitMode(false),
       IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
     Emitter(X86TargetMachine &tm, MachineCodeEmitter &mce,
             const X86InstrInfo &ii, const TargetData &td, bool is64)
-      : MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm), 
+      : MachineFunctionPass(&ID), II(&ii), TD(&td), TM(tm), 
       MCE(mce), PICBaseOffset(0), Is64BitMode(is64),
       IsPIC(TM.getRelocationModel() == Reloc::PIC_) {}
 
index 7dadd44b1cee94b4fc980853629f857fb83cb8ad..5da02c64742fa2ebb7c25dd1fc01f9ec44fc0144 100644 (file)
@@ -53,7 +53,7 @@ STATISTIC(NumFP  , "Number of floating point instructions");
 namespace {
   struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
     static char ID;
-    FPS() : MachineFunctionPass((intptr_t)&ID) {}
+    FPS() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
 
index 4f335ab76252fea34ba78dcc23b90066c2117a6b..d7bf93974e6173e371ab49035eb5804253dfcfe7 100644 (file)
@@ -1118,7 +1118,7 @@ unsigned getX86SubSuperRegister(unsigned Reg, MVT VT, bool High) {
 namespace {
   struct VISIBILITY_HIDDEN MSAC : public MachineFunctionPass {
     static char ID;
-    MSAC() : MachineFunctionPass((intptr_t)&ID) {}
+    MSAC() : MachineFunctionPass(&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF) {
       MachineFrameInfo *FFI = MF.getFrameInfo();
index f2a8322550f8f1f572b50e0fc5b5dfa5e36e5c12..d07f6135257f193f7549328b943aba137747eb00 100644 (file)
@@ -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++;
index 5934c5ea24e98d98b2fcec9b2356c8220459e2b8..97433801da2829ed168708dce105eb65e3a7ac83 100644 (file)
@@ -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
index 86cfcc4624aab765a1e426da4eed782313fd7417..b4bab2d0e7e8e8baa35ccdfe006ce62bff211853 100644 (file)
@@ -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.
index 5f1920b0618a92ddae999d701f5398160085835f..ec8f1364e8233166b8d3cd29f4edd2aa84f95881 100644 (file)
@@ -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; }
index 3cb658ef72f1a663d6546f56c6df6fe55929e9d2..85aed2b7915d72729cd0199cd1abf8c3b0f1eb1c 100644 (file)
@@ -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
index 03a8e5cebca9173d1833e3b67b35dd7e5f208415..d409b6e8067e0dc4ad7f6e780d9dca8e0e42cf16 100644 (file)
@@ -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) {
index 608705b10a055030bd40755ab5382d855ff64bb1..020c70ab375b2dfed5f74fb35277059951b6a869 100644 (file)
@@ -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.
index f63ef46a8505ca89290f11c067483d0300db400f..f9a7c73534b0e61a351969b22ae661ab5b528d17 100644 (file)
@@ -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);
 
index 42c02e6a45c45907960061c5f72c7ec8fc896832..aecec44aea0edb042a81b07555c8cc62a8ba9f29 100644 (file)
@@ -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:
index 84483748594b89ac74a5cadb0b45a5fed2bb3f5a..2e09fe967f4fc88d37fdbcbbd7ca4ff669c7edc3 100644 (file)
@@ -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);
   };
index 38cb67dddf1d59a351aaab19fbe11a74d6acde56..88b6afdebb702bbde599ecb1524a325974b8b9cb 100644 (file)
@@ -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
index 577d69cf60b893ae4cbb6ad31162b757a7770e55..cbfccf2a2c7b76c7dda7d8708c37bd4d0146287a 100644 (file)
@@ -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);
index 8e55b3f09192142a0cbedf2e1a3253e578bc3efe..0c654438d5086f79a0d55305cc44dc8b5701b759 100644 (file)
@@ -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);
   };
index 80158b43a5c0bf043d925092f9ea0d044c2daf95..d5997fb4b514305f489bb6f925fdfbfb8fa2e997 100644 (file)
@@ -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);
index d39ea58ab672a6cfa579ac1f3d821dde8b459b4c..949358e7bc903e85ffa34a7336c78d115c68bdbb 100644 (file)
@@ -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);
   };
 }
index d4194a1060eec96c76580b9ad51cb5abebf4c3c4..5e50e20af4db21f6ab360eafe904cb7445fa6a06 100644 (file)
@@ -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);
index daf8ef00053ef22a69f8d2cc97609ed694093675..a81bbdb3c53d68aaee165644f1a031c401135f72 100644 (file)
@@ -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.
index 7db0aa8d129b2ae13a4c250bef2671601df58e8a..a94d78e276c5466a795a5ddf7ddc3048175c6003 100644 (file)
@@ -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);
 };
 
index 63e1a7beb042cfe085810ab6bbc8711584d8bfc9..6277f07de3ac5d562b70c1d47a0b60ae867aa096 100644 (file)
@@ -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);
 
index 2f44d80ae489395c1dc970f26ae6f3387f0ad36c..2a7de3dc4918d5b8eaac5d1cc140b6cea401dc92 100644 (file)
@@ -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);
index 2cf824b25f5e0836efed82dba737bfcc40c1fa04..0831f3b7a4800f2b28c7fcbedd8ea41b5c667adc 100644 (file)
@@ -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) {}
   };
 }
 
index 45a7c712d8c7168368c3418de95d400abd64772a..c6cf4dfd6ebfa961227bfa052437635783d143d5 100644 (file)
@@ -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;
index aef16f7f1cea9dea904228736025ae99624000ff..3481c0014358878ddb83160b24c8b755f40902aa 100644 (file)
@@ -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);
     
index 041bed234b6fdbe616263fdb306d2f45ceb5db34..fb9b88005b6a8d712ac8e7b82d7d7f594b2709af 100644 (file)
@@ -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);
 
index da0d287817c9227e8c59bcb7cf744d87ec718c6b..a000c009cc6e67e13eacc72cae3a365124c9697d 100644 (file)
@@ -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:
index c1e419569f47cf8c56af77851ffa5c3ba88a66d9..126e13e453aa3f31396a09a56b9bc8e048e3902a 100644 (file)
@@ -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);
 
index 05bb4f0c7be754d6677c48bea2f6e23242ea8cc5..b933488cf636f315603493b838bd0c41fce5da8f 100644 (file)
@@ -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);
 
index a63fcb6589f7ae2e9b10ebd67693797d269ccdac..cb78207d760bc0d9b82bc1e01fee2ea63fced7de 100644 (file)
@@ -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);
 
index b75d5c4be7ea3ee7f04a5caab458dea960b76a5c..7e5fbcb8014bc6a392d8b8fd8ca939a4f82d1f30 100644 (file)
@@ -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;
index b258fcc08c0423d5d68ff93e958d5ca94429ec50..1e5be4ab1a77c4ff1829e328deed86155fa0724d 100644 (file)
@@ -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;
index e0c869fbf8d566189bd558597921abb5a82a072c..e3b09379a22d7cd67e5d4a87996e140b0c1af6cd 100644 (file)
@@ -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;
index 5d709e50fbbf1ad764aa0893a1a87d35d4631477..3d29fd686378100412e4247c7022389885eadcd9 100644 (file)
@@ -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);
index aedad72037ea545798a8033e00f7f86af6909d0e..6b25f52a818ec895091af97141a0b5b7501f9426 100644 (file)
@@ -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.
index 1d3bfbfe7c2ba495fb8344c612783b179681f8c8..2f91c07c94e20e40d1d99d7e0210c561fcaaf74b 100644 (file)
@@ -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);
index aef1cd6f6f8d7255fe1b92d451be5c93bd874395..3eee4a27f7d6eda3bd1ebbd58563454c08b2df5f 100644 (file)
@@ -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);
 
index f68a5f7125a064520692c20181f3bac4d269e2af..74190f5f7769dea81bb6aaac19310b38ac1a72b4 100644 (file)
@@ -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);
index 1ab9a18cf6f2ae2a183bb8f3930d82dde3a3c4b5..d8a1eb68aa36635caf2e56ed29183e0adca5f3bb 100644 (file)
@@ -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);
index f0dd40bd33968e8f4cff7be6bdcd18102d914e79..488ab0eacff4fd4a17a25767cb82baea1fb50ec9 100644 (file)
@@ -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.
index 96fa0e9eb16c0af3c730884c7439c2c7241994e4..6d8de40780a160300b7f9d63ac9d36a54bb3acbb 100644 (file)
@@ -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);
index 386b91c252cac50997663449e29bc7a81a35fe49..ed4ea895cc26f5c0aa073a3c7a4ca75d1a23c62a 100644 (file)
@@ -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
index 5473bac555bc6a0ee6dc1e1185922c9911c286e7..372e6e4f8342e78e5c3ebaea6061807bd9b788cf 100644 (file)
@@ -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) {}
 
index e20278aed3eeddefb2070b10c4fd07183edb9cba..5e83ee93103ecc5ea9a726445f06ee02b633cb11 100644 (file)
@@ -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);
 
index 18f5f0c1306516f23e5791c4960d37e16fe5bd91..8810edb53323d9478948a8db73ef014dc50029dc 100644 (file)
@@ -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
index 9a94fad93278b55a5b90c5a313e84448fe5a1ecb..665a46bfd73fb82847287e21478dc1f5c80f4776 100644 (file)
@@ -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);
 
index dbb87c5e5b464bb57f2d4b833f921936a8db38c6..313723cfefa09e4f74a5359eb95a9656ec23861b 100644 (file)
@@ -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);
 
index ce38b08ef97fa02cd0723a6f834ec40715affc99..46b2952b4cc5ef2ed728ce23cd21aae5338c3cf6 100644 (file)
@@ -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);
index ed0f727ecdfa1555a9b5b2d6212e767cd41153dd..48842b2e38544200517c16f03ec94dd29fa06b60 100644 (file)
@@ -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
index c5ca22145e3f7cd99826ab2651b045eb1867bb65..c29202826c24c047c838fbeb03208e9db4194e1d 100644 (file)
@@ -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
index 23683289c0b3c244f0c3442f7c6bea7f5088f08c..cd063079f689993e4150789cce980e492232abf9 100644 (file)
@@ -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);
   };
index 8ef88553555e874d45baf8228576f05776c5a3f5..965d1ce0dee4604224e0055e4c3ddac4bab14fa5 100644 (file)
@@ -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);
index d0998ab5a65d5984d7443985da79f179aa60e357..568ec06e39fb3697da429b63cb9aeefb00f807ff 100644 (file)
@@ -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);
index 6fcf55b581aa01312bf35cd875d550234fb0cc07..e1234efb57881e57d232b432c16d1dbcb5eefdf0 100644 (file)
@@ -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);
 
index a821423d17f7d14194d1f8d57ec123f9131f3a93..a32c01671282f70779e67b2cda3c9745fc2bd9c9 100644 (file)
@@ -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);
 
index 55d7a485931e25d6d7be48c7bfa0065ac9c13e75..bcba3c13990619e47b5f2ca3033b6d0db76b5142 100644 (file)
@@ -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;
index 3267af74c3e130cfb5fb29209b65f34772063032..af41036252b277f91535f6dbb78bb60bdb22b675 100644 (file)
@@ -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.
index 4223c7f4813937aba1fcab81ba4951abad595efa..792e98ea428582c0cde363ed9600bbef7612c115 100644 (file)
@@ -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 {
index 0f86765a70de85c5a0723d13ec18970c74e4bc28..437fdbe04ddb6decf262c0ddd1c3e00a7ba160c3 100644 (file)
@@ -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);
  
index 99e938416ec22bba83d964db05abe182e1491260..a7b1efc794f5fdbd216a06647a43fb7491dc828d 100644 (file)
@@ -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);
     
index 1a936c04141a040114bdb9ed9bb43356867726f9..2b06d778e14526e7cf1e114341494ec8cb8b9b1d 100644 (file)
@@ -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.
index d7b3cc7e638baf28be9716070be18189099cf630..42b33ff66b1407603ff4a0c8fde1505a0216ab00 100644 (file)
@@ -73,7 +73,7 @@ class VISIBILITY_HIDDEN BBPassManager : public PMDataManager,
 public:
   static char ID;
   explicit BBPassManager(int Depth) 
-    : PMDataManager(Depth), FunctionPass((intptr_t)&ID) {}
+    : PMDataManager(Depth), FunctionPass(&ID) {}
 
   /// Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the function, and if so, return true.
@@ -129,7 +129,7 @@ class FunctionPassManagerImpl : public Pass,
 public:
   static char ID;
   explicit FunctionPassManagerImpl(int Depth) : 
-    Pass((intptr_t)&ID), PMDataManager(Depth), 
+    Pass(&ID), PMDataManager(Depth), 
     PMTopLevelManager(TLM_Function) { }
 
   /// add - Add a pass to the queue of passes to run.  This passes ownership of
@@ -193,7 +193,7 @@ class MPPassManager : public Pass, public PMDataManager {
 public:
   static char ID;
   explicit MPPassManager(int Depth) :
-    Pass((intptr_t)&ID), PMDataManager(Depth) { }
+    Pass(&ID), PMDataManager(Depth) { }
 
   // Delete on the fly managers.
   virtual ~MPPassManager() {
@@ -269,8 +269,7 @@ class PassManagerImpl : public Pass,
 public:
   static char ID;
   explicit PassManagerImpl(int Depth) :
-    Pass((intptr_t)&ID), PMDataManager(Depth),
-    PMTopLevelManager(TLM_Pass) { }
+    Pass(&ID), PMDataManager(Depth), PMTopLevelManager(TLM_Pass) { }
 
   /// add - Add a pass to the queue of passes to run.  This passes ownership of
   /// the Pass to the PassManager.  When the PassManager is destroyed, the pass
index 5ca8e1a23a2d1da9a8c1b409d82bc0b336ea9af3..aa6963d94a238a0210e8a2203152f6748af85efd 100644 (file)
@@ -70,7 +70,7 @@ namespace {  // Anonymous namespace for class
   struct VISIBILITY_HIDDEN PreVerifier : public FunctionPass {
     static char ID; // Pass ID, replacement for typeid
 
-    PreVerifier() : FunctionPass((intptr_t)&ID) { }
+    PreVerifier() : FunctionPass(&ID) { }
 
     // Check that the prerequisites for successful DominatorTree construction
     // are satisfied.
@@ -118,20 +118,20 @@ namespace {
     SmallPtrSet<Instruction*, 16> InstsInThisBlock;
 
     Verifier()
-      : FunctionPass((intptr_t)&ID), 
+      : FunctionPass(&ID), 
       Broken(false), RealPass(true), action(AbortProcessAction),
       DT(0), msgs( std::ios::app | std::ios::out ) {}
     explicit Verifier(VerifierFailureAction ctn)
-      : FunctionPass((intptr_t)&ID), 
+      : FunctionPass(&ID), 
       Broken(false), RealPass(true), action(ctn), DT(0),
       msgs( std::ios::app | std::ios::out ) {}
     explicit Verifier(bool AB)
-      : FunctionPass((intptr_t)&ID), 
+      : FunctionPass(&ID), 
       Broken(false), RealPass(true),
       action( AB ? AbortProcessAction : PrintMessageAction), DT(0),
       msgs( std::ios::app | std::ios::out ) {}
     explicit Verifier(DominatorTree &dt)
-      : FunctionPass((intptr_t)&ID), 
+      : FunctionPass(&ID), 
       Broken(false), RealPass(false), action(PrintMessageAction),
       DT(&dt), msgs( std::ios::app | std::ios::out ) {}