Repository navigation
Unify RIR SSA transform into single pass, fix mapping bugs - #3941
Open
Stefan J. Wernli (swernli) wants to merge 1 commit into
Open
Stefan J. Wernli (swernli) wants to merge 1 commit into
Stefan J. Wernli (swernli) wants to merge 1 commit into
Conversation
Stefan J. Wernli (swernli)
requested review from
Bill Ticehurst (billti) and
Ian Davis (idavis)
as code owners
October 9, 2026 05:40
Stefan J. Wernli (swernli)
added this pull request to stack #3870
October 9, 2026 05:40
Stefan J. Wernli (swernli)
force-pushed
the
swernli/issue3908
branch
from
October 9, 2026 06:29
ea79349 to
978fb42
Compare
Stefan J. Wernli (swernli)
force-pushed
the
swernli/issue3908
branch
from
October 9, 2026 20:25
978fb42 to
298ef2b
Compare
Stefan J. Wernli (swernli)
force-pushed
the
swernli/issue3908
branch
from
October 9, 2026 21:59
298ef2b to
a2e9064
Compare
This is fixes #3908 with two related RIR pass bugs that needed separate tweaks: 1. The SSA transform was performed internally via two passes across the blocks (two separate calls to the `map_variable_use_in_block` utility), but some information was lost after the first pass removed all store instructions. Unifying to a single pass with necessary phi node insertion computed from predecessors ahead of time prevents the loss of context. 2. For the Adaptive-only pruning of unneeded stores, old variable mappings were persisted even after a store may change what value a variable corresponds to, so removing the mapping when a store is NOT pruned prevents out of date constant values from propagating within a block.
Stefan J. Wernli (swernli)
force-pushed
the
swernli/issue3908
branch
from
October 10, 2026 21:03
a2e9064 to
3709f81
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is fixes #3908 with two related RIR pass bugs that needed separate tweaks:
map_variable_use_in_blockutility), but some information was lost after the first pass removed all store instructions. Unifying to a single pass with necessary phi node insertion computed from predecessors ahead of time prevents the loss of context.Stack created with GitHub Stacks CLI • Give Feedback 💬