Skip to content

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jan 6, 2025

This fixes the bug by having partial evaluation more explicitly track different variable mappings to literals across branches and recombining those mappings that match (ie: are constant) when all branches are done. This also includes partial eval and RIR SSA pass fixes to correctly support immutable and mutable copies of dynamic variables. New test cases for several combinations of constant folding at partial eval are included, as well as a new test case confirming RIR SSA fix.

Fixes #2087

…n partial evaluation

This fixes the bug by having partial evaluation more explicitly track different variable mappings to literals across branches and recombining those mappings that match (ie: are constant) when all branches are done. This also includes partial eval and RIR SSA pass fixes to correctly support immutable and mutable copies of dynamic variables. New test cases for several combinations of constant folding at partial eval are included, as well as a new test case confirming RIR SSA fix.

Fixes #2087
@idavis idavis requested a review from orpuente-MS January 9, 2025 00:42
@swernli swernli added this pull request to the merge queue Jan 9, 2025
Merged via the queue into main with commit d7f8962 Jan 9, 2025
18 checks passed
@swernli swernli deleted the swernli/issue2087 branch January 9, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mutable variables in dynamic branches prevent full constant folding in partial evaluation
3 participants