Stream: git-wasmtime

Topic: wasmtime / PR #5840 x64: Tidy up some handling of sinkabl...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 20 2023 at 16:18):

alexcrichton opened PR #5840 from x64-sinking-loads to main:

This commit refactors a bit about how sinkable loads are handled in the x64 backend. The intention is to bring most handling around sinkable loads up to date with the current state of the backend since things have changed since these were originally introduced, namely automatic conversions between types in ISLE. For example the Value type can be automatically converted to RegMem to perform load sinking, but some rules are still explicitly doing matching themselves.

Here I've removed explicit handling of immediates and sinkable loads when they're the right-hand-side of an operation. These cases are already handle by the "base case" when converting a Value to a RegMemImm. Instead only rules explicitly for left-hand-side immediates and sinkable loads remain. This helps cut down on the number of explicit rules needed.

Additionally in the same manner that Value can be automatically converted to RegMem I've added automatic conversions from SinkableLoad to RegMem and the various other newtypes. This helps cut down a bit on rule verbosity where sink_load_* is largely no longer necessary.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2023 at 18:15):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 21 2023 at 19:12):

cfallin merged PR #5840.


Last updated: Nov 22 2024 at 16:03 UTC