mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 832065 - don't use resume point to iterate over phis (r=sstangl)
--HG-- extra : rebase_source : 0c54df0ad7fb5daba820efaa49a1d8eb7e355104
This commit is contained in:
parent
eee3c125d4
commit
43bd40a839
@ -654,9 +654,9 @@ MBasicBlock::setBackedge(MBasicBlock *pred)
|
||||
JS_ASSERT(kind_ == PENDING_LOOP_HEADER);
|
||||
|
||||
// Add exit definitions to each corresponding phi at the entry.
|
||||
for (uint32_t i = 0; i < pred->stackDepth(); i++) {
|
||||
MPhi *entryDef = entryResumePoint()->getOperand(i)->toPhi();
|
||||
MDefinition *exitDef = pred->slots_[i];
|
||||
for (MPhiIterator phi = phisBegin(); phi != phisEnd(); phi++) {
|
||||
MPhi *entryDef = *phi;
|
||||
MDefinition *exitDef = pred->slots_[entryDef->slot()];
|
||||
|
||||
// Assert that we already placed phis for each slot.
|
||||
JS_ASSERT(entryDef->block() == this);
|
||||
@ -675,7 +675,8 @@ MBasicBlock::setBackedge(MBasicBlock *pred)
|
||||
if (!entryDef->addInput(exitDef))
|
||||
return false;
|
||||
|
||||
setSlot(i, entryDef);
|
||||
JS_ASSERT(entryDef->slot() < pred->stackDepth());
|
||||
setSlot(entryDef->slot(), entryDef);
|
||||
}
|
||||
|
||||
// We are now a loop header proper
|
||||
|
Loading…
Reference in New Issue
Block a user