mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 11:28:38 +00:00
Bug 754155 - Fix RPO issue in LookupSwitch compilation. (r=dvander)
This commit is contained in:
parent
1dd735b1d6
commit
210a8ffb30
@ -1459,6 +1459,9 @@ IonBuilder::processNextLookupSwitchCase(CFGState &state)
|
||||
successor->addPredecessor(current);
|
||||
}
|
||||
|
||||
// Move next body block to end to maintain RPO.
|
||||
graph_.moveBlockToEnd(successor);
|
||||
|
||||
// If this is the last successor the block should stop at the end of the lookupswitch
|
||||
// Else it should stop at the start of the next successor
|
||||
if (curBlock + 1 < state.lookupswitch.bodies->length())
|
||||
@ -2209,9 +2212,9 @@ IonBuilder::lookupSwitch(JSOp op, jssrcnote *sn)
|
||||
// Fill bodies in CFGState using bodies in bodyBlocks, move them to
|
||||
// end in order in order to maintain RPO
|
||||
for (size_t i = 0; i < bodyBlocks.length(); i++) {
|
||||
graph_.moveBlockToEnd(bodyBlocks[i]);
|
||||
(*state.lookupswitch.bodies)[i] = bodyBlocks[i];
|
||||
}
|
||||
graph_.moveBlockToEnd(bodyBlocks[0]);
|
||||
|
||||
// Create control flow info
|
||||
ControlFlowInfo switchinfo(cfgStack_.length(), exitpc);
|
||||
|
Loading…
Reference in New Issue
Block a user