Fix PR number.
[oota-llvm.git] / lib / CodeGen / PHIElimination.cpp
index 513bfdeb256b6282b25814d1b86f289cb7451089..fec9e2ec32784fda9c92d7a4e963705a07f835e0 100644 (file)
@@ -33,6 +33,9 @@ STATISTIC(NumAtomic, "Number of atomic phis lowered");
 
 namespace {
   struct VISIBILITY_HIDDEN PNE : public MachineFunctionPass {
+    static char ID; // Pass identification, replacement for typeid
+    PNE() : MachineFunctionPass((intptr_t)&ID) {}
+
     bool runOnMachineFunction(MachineFunction &Fn) {
       analyzePHINodes(Fn);
 
@@ -73,6 +76,7 @@ namespace {
     VRegPHIUse VRegPHIUseCount;
   };
 
+  char PNE::ID = 0;
   RegisterPass<PNE> X("phi-node-elimination",
                       "Eliminate PHI nodes for register allocation");
 }
@@ -163,8 +167,6 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
     // 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;
   }
 
   // Adjust the VRegPHIUseCount map to account for the removal of this PHI
@@ -215,7 +217,6 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
     // instruction kills the incoming value.
     //
     LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg);
-    InRegVI.UsedBlocks[opBlock.getNumber()] = true;
 
     // Loop over all of the successors of the basic block, checking to see
     // if the value is either live in the block, or if it is killed in the