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 toRegMem
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 aRegMemImm
. 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 toRegMem
I've added automatic conversions fromSinkableLoad
toRegMem
and the various other newtypes. This helps cut down a bit on rule verbosity wheresink_load_*
is largely no longer necessary.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
cfallin submitted PR review.
cfallin merged PR #5840.
Last updated: Dec 23 2024 at 12:05 UTC