reserve operand space for phi nodes when we insert them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-08-04 20:14:34 +00:00
parent 6c81213b4c
commit 384c7e0436

View File

@ -772,6 +772,7 @@ bool PromoteMem2Reg::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo,
Allocas[AllocaNo]->getName() + "." +
utostr(Version++), BB->begin());
PhiToAllocaMap[PN] = AllocaNo;
PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB)));
InsertedPHINodes.insert(PN);