reserve operand space for phi nodes when we insert them.

llvm-svn: 40820
This commit is contained in:
Chris Lattner 2007-08-04 20:14:34 +00:00
parent 9318785df5
commit 050bac4bed
1 changed files with 1 additions and 0 deletions

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);