Maintain ETNode as part of DomTreeNode.

This adds redundancy for now.

llvm-svn: 37492
This commit is contained in:
Devang Patel
2007-06-07 17:47:21 +00:00
parent 5801c23e05
commit af41e4a192
5 changed files with 124 additions and 35 deletions

View File

@@ -157,7 +157,7 @@ void LCSSA::ProcessInstruction(Instruction *Instr,
BasicBlock *BB = *BBI;
DomTreeNode *ExitBBNode = DT->getNode(BB);
Value *&Phi = Phis[ExitBBNode];
if (!Phi && InstrNode->dominates(ExitBBNode)) {
if (!Phi && DT->dominates(InstrNode, ExitBBNode)) {
PHINode *PN = new PHINode(Instr->getType(), Instr->getName()+".lcssa",
BB->begin());
PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB)));