FunctionCompiler::collectCallResults: place MWasmRegisterResult before MWasmStackResult(s)
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
People
(Reporter: jseward, Assigned: jseward)
Details
There is an implicit value flow between LWasmCall and
LWasmRegister{,Pair}Result nodes which the register allocator has to
special-case, and it can only do that if there are no intervening LIRs. That
in turn requires that there are no intervening MIRs.
However, MIR generation as it stands emits MWasmStackResult nodes before
MWasmRegisterResult. This happens to work by chance at the moment in that the
existing register allocator's splitting strategy will not cause MoveGroups to
be inserted between LWasmCall and its associated LWasmRegisterResult. Future
regalloc changes insert MoveGroups more aggressively and cause incorrect
allocations using the existing ordering.
The obvious fix is to emit {M,L}WasmRegisterResult first, not last, in the
result-acquisition sequence.
Updated•3 years ago
|
Description
•