Closed Bug 1712692 Opened 3 years ago Closed 3 years ago

ARM64: Avoid useRegister when useRegisterAtStart is good enough

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

ARM64
All
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: lth, Assigned: lth)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1710024 +++

We use plain useRegister in the arm64 back-end when we could be using useRegisterAtStart, see eg the lowering of wasmShiftSimd128 with constant argument. This leads to more reg->reg moves and higher register pressure than necessary.

Clearly bug 1710024 addresses a related matter so there's some overlap between this bug and that, but also a separate investigation to do here.

No longer blocks: 1710403

copysign: This does not need to reuse its input, so stop doing that.
Also a drive-by fix to prevent redundant register-to-register moves.

shift lanes by constant: This does not need to reuse its input, so
stop doing that.

replaceLane: This is optimal when it reuses its lhs as the output, so
do that. Remove the three-argument forms from the masm api, they are
only needed for loadLane, but load-lane can set up an lhs+output
argument just as easily.

loadLane: This is currently optimal when it reuses the lhs as the
output, but I did not change this because the work would have to be
undone again for bug 1706106, where we may be able to choose a
different codegen strategy. Left a comment in the code instead.

binary SIMD: removed a comment that points to something that is
actually bug 1701164, but the comment is not needed here.

Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/38d302297da3
useRegisterAtStart when possible on ARM64.  r=yury

(The leave-open came in with the bug cloning.)

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: