forked from OSchip/llvm-project
reserve operand space for phi nodes when we insert them.
llvm-svn: 40820
This commit is contained in:
parent
9318785df5
commit
050bac4bed
|
@ -772,6 +772,7 @@ bool PromoteMem2Reg::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo,
|
||||||
Allocas[AllocaNo]->getName() + "." +
|
Allocas[AllocaNo]->getName() + "." +
|
||||||
utostr(Version++), BB->begin());
|
utostr(Version++), BB->begin());
|
||||||
PhiToAllocaMap[PN] = AllocaNo;
|
PhiToAllocaMap[PN] = AllocaNo;
|
||||||
|
PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB)));
|
||||||
|
|
||||||
InsertedPHINodes.insert(PN);
|
InsertedPHINodes.insert(PN);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue