mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 01:15:32 +00:00
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:
parent
6c81213b4c
commit
384c7e0436
@ -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…
x
Reference in New Issue
Block a user