X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FPHIElimination.cpp;h=c5c76fc79467d99fd1fb63b89cc9bf08df70e402;hb=74d3f50a803347432b3dc26f67e23297c2a1f232;hp=67c555fd17f8fd314877cd5fb7cf8642e80a8c63;hpb=dfec24c87711bac1564465742012d47bd5984c30;p=oota-llvm.git diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 67c555fd17f..c5c76fc7946 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/lib/CodeGen/PHIElimination.cpp @@ -249,8 +249,6 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB, // each for each incoming block), the "def" block and instruction fields // for the VarInfo is not filled in. LV->addVirtualRegisterKilled(IncomingReg, PHICopy); - - LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true; } // Since we are going to be deleting the PHI node, if it is the last use of @@ -317,7 +315,6 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB, // variables information so that it knows the copy source 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 block. @@ -337,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; } @@ -410,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); } }