[llvm-commits] CVS: llvm/lib/Target/Sparc/DelaySlotFiller.cpp FPMover.cpp

Devang Patel dpatel at apple.com
Tue May 1 14:17:45 PDT 2007



Changes in directory llvm/lib/Target/Sparc:

DelaySlotFiller.cpp updated: 1.13 -> 1.14
FPMover.cpp updated: 1.18 -> 1.19
---
Log message:

Do not use typeinfo to identify pass in pass manager.


---
Diffs of the changes:  (+9 -3)

 DelaySlotFiller.cpp |    5 ++++-
 FPMover.cpp         |    7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/Sparc/DelaySlotFiller.cpp
diff -u llvm/lib/Target/Sparc/DelaySlotFiller.cpp:1.13 llvm/lib/Target/Sparc/DelaySlotFiller.cpp:1.14
--- llvm/lib/Target/Sparc/DelaySlotFiller.cpp:1.13	Tue Dec 19 16:59:26 2006
+++ llvm/lib/Target/Sparc/DelaySlotFiller.cpp	Tue May  1 16:15:46 2007
@@ -30,7 +30,9 @@
     TargetMachine &TM;
     const TargetInstrInfo *TII;
 
-    Filler(TargetMachine &tm) : TM(tm), TII(tm.getInstrInfo()) { }
+    static const int ID;
+    Filler(TargetMachine &tm) 
+      : MachineFunctionPass((intptr_t)&ID), TM(tm), TII(tm.getInstrInfo()) { }
 
     virtual const char *getPassName() const {
       return "SPARC Delay Slot Filler";
@@ -46,6 +48,7 @@
     }
 
   };
+  const int Filler::ID = 0;
 } // end of anonymous namespace
 
 /// createSparcDelaySlotFillerPass - Returns a pass that fills in delay


Index: llvm/lib/Target/Sparc/FPMover.cpp
diff -u llvm/lib/Target/Sparc/FPMover.cpp:1.18 llvm/lib/Target/Sparc/FPMover.cpp:1.19
--- llvm/lib/Target/Sparc/FPMover.cpp:1.18	Tue Dec 19 16:59:26 2006
+++ llvm/lib/Target/Sparc/FPMover.cpp	Tue May  1 16:15:46 2007
@@ -31,8 +31,10 @@
     /// layout, etc.
     ///
     TargetMachine &TM;
-
-    FPMover(TargetMachine &tm) : TM(tm) { }
+    
+    static const int ID;
+    FPMover(TargetMachine &tm) 
+      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Sparc Double-FP Move Fixer";
@@ -41,6 +43,7 @@
     bool runOnMachineBasicBlock(MachineBasicBlock &MBB);
     bool runOnMachineFunction(MachineFunction &F);
   };
+  const int FPMover::ID = 0;
 } // end of anonymous namespace
 
 /// createSparcFPMoverPass - Returns a pass that turns FpMOVD






More information about the llvm-commits mailing list