X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FPHIElimination.cpp;h=845b1c11d645d7e85211da70c61beab9ec5e0fbf;hb=63e3cd4e0f3731d6801ac24199652e4d7b4b3729;hp=07c4ef3f50948c3b13e38ebdb0b25ffa226c0777;hpb=d10fd9791c20fd8368fa0ce94b626b769c6c8ba0;p=oota-llvm.git diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 07c4ef3f509..845b1c11d64 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/lib/CodeGen/PHIElimination.cpp @@ -51,6 +51,8 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved(); + 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 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