cfallin opened PR #4042 from fix-blockparam-branch-args
to main
:
Previously, the block successor accumulation and the blockparam branch
arg setup were decoupled. The lowering backend implicitly specified
the order of successor edges via itsMachTerminator
enum on the last
instruction in the block, while theLower
toplevel
machine-independent driver set up blockparam branch args in the edge
order seen in CLIF.In some cases, these orders did not match -- for example, when the
conditional branch depended on an FP condition that was implemented by
swapping taken/not-taken edges and inverting the condition code.This PR refactors the successor handling to be centralized in
Lower
rather than flow through the terminatorMachInst
, and adds a
successor block and its blockparam args at the same time, ensuring the
orders match.<!--
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 requested fitzgen for a review on PR #4042.
fitzgen submitted PR review.
cfallin merged PR #4042.
Last updated: Dec 23 2024 at 12:05 UTC