mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879727: IonMonkey: During UCE remove corresponding MPassArgs when removing calls, r=jandem
This commit is contained in:
parent
69f19300e6
commit
61232f683e
@ -235,6 +235,22 @@ UnreachableCodeElimination::removeUnmarkedBlocksAndClearDominators()
|
||||
}
|
||||
}
|
||||
|
||||
// When we remove a call, we can't leave the corresponding MPassArg in the graph.
|
||||
// Since lowering will fail. Replace it with the argument for the exceptional
|
||||
// case when it is kept alive in a ResumePoint.
|
||||
// DCE will remove the unused MPassArg instruction.
|
||||
for (MInstructionIterator iter(block->begin()); iter != block->end(); iter++) {
|
||||
if (iter->isCall()) {
|
||||
MCall *call = iter->toCall();
|
||||
for (size_t i = 0; i < call->numStackArgs(); i++) {
|
||||
JS_ASSERT(call->getArg(i)->isPassArg());
|
||||
JS_ASSERT(call->getArg(i)->defUseCount() == 1);
|
||||
MPassArg *arg = call->getArg(i)->toPassArg();
|
||||
arg->replaceAllUsesWith(arg->getArgument());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graph_.removeBlock(block);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user