Expand tabs to spaces (overlooked in previous commit)
[oota-llvm.git] / lib / CodeGen / PHIElimination.cpp
index 6dbc3dc299e4e4adc7835321186c4a3c5a990edc..b32db2e062fa8c73cd0fef336c15ab871869184a 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);
     
@@ -166,7 +166,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
   if (isSourceDefinedByImplicitDef(MPhi, MRI))
     // If all sources of a PHI node are implicit_def, just emit an
     // implicit_def instead of a copy.
-    BuildMI(MBB, AfterPHIsIt,
+    BuildMI(MBB, AfterPHIsIt, MPhi->getDebugLoc(),
             TII->get(TargetInstrInfo::IMPLICIT_DEF), DestReg);
   else {
     IncomingReg = MF.getRegInfo().createVirtualRegister(RC);
@@ -174,7 +174,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
   }
 
   // Update live variable information if there is any.
-  LiveVariables *LV = getAnalysisToUpdate<LiveVariables>();
+  LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>();
   if (LV) {
     MachineInstr *PHICopy = prior(AfterPHIsIt);
 
@@ -354,7 +354,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
   }
     
   // Really delete the PHI instruction now!
-  delete MPhi;
+  MF.DeleteMachineInstr(MPhi);
   ++NumAtomic;
 }