Maintain ETNode as part of DomTreeNode.

This adds redundancy for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-06-07 17:47:21 +00:00
parent b62fa8ab6b
commit 9a51157db5
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)));