Remove unnecessary #include.
[oota-llvm.git] / lib / CodeGen / PHIElimination.cpp
index 07c4ef3f50948c3b13e38ebdb0b25ffa226c0777..845b1c11d645d7e85211da70c61beab9ec5e0fbf 100644 (file)
@@ -51,6 +51,8 @@ namespace {
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addPreserved<LiveVariables>();
+      AU.addPreservedID(MachineLoopInfoID);
+      AU.addPreservedID(MachineDominatorsID);
       MachineFunctionPass::getAnalysisUsage(AU);
     }
 
@@ -163,10 +165,6 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
       LV->addVirtualRegisterDead(DestReg, PHICopy);
       LV->removeVirtualRegistersDead(MPhi);
     }
-    
-    // Realize that the destination register is defined by the PHI copy now, not
-    // the PHI itself.
-    LV->getVarInfo(DestReg).DefInst = PHICopy;
 
     LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true;
   }
@@ -183,7 +181,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
   std::set<MachineBasicBlock*> MBBsInsertedInto;
   for (int i = MPhi->getNumOperands() - 1; i >= 2; i-=2) {
     unsigned SrcReg = MPhi->getOperand(i-1).getReg();
-    assert(MRegisterInfo::isVirtualRegister(SrcReg) &&
+    assert(TargetRegisterInfo::isVirtualRegister(SrcReg) &&
            "Machine PHI Operands must all be virtual registers!");
 
     // Get the MachineBasicBlock equivalent of the BasicBlock that is the