This is supposed to be a preorder numbering of the dominator tree, not the CFG.
[oota-llvm.git] / lib / CodeGen / PHIElimination.cpp
index 2eacb086d8b0258b23b79304672bed9d1666040d..c5c76fc79467d99fd1fb63b89cc9bf08df70e402 100644 (file)
@@ -334,8 +334,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
 
       // Is it alive in this successor?
       unsigned SuccIdx = SuccMBB->getNumber();
-      if (SuccIdx < InRegVI.AliveBlocks.size() &&
-          InRegVI.AliveBlocks[SuccIdx]) {
+      if (InRegVI.AliveBlocks.test(SuccIdx)) {
         ValueIsLive = true;
         break;
       }
@@ -407,8 +406,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
 
       // This vreg no longer lives all of the way through opBlock.
       unsigned opBlockNum = opBlock.getNumber();
-      if (opBlockNum < InRegVI.AliveBlocks.size())
-        InRegVI.AliveBlocks[opBlockNum] = false;
+      InRegVI.AliveBlocks.reset(opBlockNum);
     }
   }