Drop 'const'
[oota-llvm.git] / lib / Target / Sparc / FPMover.cpp
index b85d2a9da01ef4bc19b033592e9dc74ee025a828..e1c996664a32f511f71132fffd034f9e20844174 100644 (file)
@@ -11,6 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "fpmover"
 #include "Sparc.h"
 #include "SparcSubtarget.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/Support/Debug.h"
 using namespace llvm;
 
-namespace {
-  Statistic NumFpDs("fpmover", "Number of instructions translated");
-  Statistic NoopFpDs("fpmover", "Number of noop instructions removed");
+STATISTIC(NumFpDs , "Number of instructions translated");
+STATISTIC(NoopFpDs, "Number of noop instructions removed");
 
+namespace {
   struct FPMover : public MachineFunctionPass {
     /// Target machine description which we query for reg. names, data
     /// layout, etc.
     ///
     TargetMachine &TM;
-
-    FPMover(TargetMachine &tm) : TM(tm) { }
+    
+    static char ID;
+    FPMover(TargetMachine &tm) 
+      : MachineFunctionPass((intptr_t)&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
       return "Sparc Double-FP Move Fixer";
@@ -40,6 +43,7 @@ namespace {
     bool runOnMachineBasicBlock(MachineBasicBlock &MBB);
     bool runOnMachineFunction(MachineFunction &F);
   };
+  char FPMover::ID = 0;
 } // end of anonymous namespace
 
 /// createSparcFPMoverPass - Returns a pass that turns FpMOVD