saulecabrera opened PR #5419 from refactor-apply-params
to main
:
This commit allows retrieving a
MachBufferFinalized<Final>
from aMachBufferFinalized<Stencil>
without relying on
ir::FunctionParameters
. Instead it uses the function's base source location, which is the only piece used by the previousapply_params
definition.This change allows other uses cases (e.g. Winch) to use an opaque, common concept, exposed outside of
cranelift-codegen
to get the finalized state of the machine buffer. This change implies that Winch will transitively know about theStencil
compilation phase, but theStencil
phase is not exposed to Winch.Other alternatives considered:
Parametrizing
MachBufferFinzalized
in a way such that it allows specifying which compilation phase the caller is targetting. Such approach would require also parametrizing theMachSrcLoc
definition. One of the main drawbacks of this approach is that it also requires changing how theMachBuffer
'sstart_srcloc
works: for caller requesting aFinal
MachBufferFinalized
, theMachBuffer
will need to work in terms ofSourceLoc
rather than inRelSourceLoc
terms. This approach doesn't necessarily present more advantages than the approach presented in this change, in which there's no need to make any fundamental changes and in which all thecranelift-codegen
primitives are already exposed.<!--
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.
-->
saulecabrera requested cfallin for a review on PR #5419.
jameysharp submitted PR review.
cfallin submitted PR review.
bnjbvr submitted PR review.
saulecabrera merged PR #5419.
Last updated: Nov 22 2024 at 17:03 UTC