Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made match optimizer handle future remappings. #6669

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Nov 17, 2024

Previously additional_remappings were not properly remapped due to the order of fix application.

@reviewable-StarkWare
Copy link

This change is Reviewable

@ilyalesokhin-starkware
Copy link
Contributor

crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs line 82 at r1 (raw file):

    // Fixes were added in reverse order, but we still need to add them at the reverse order, as if
    // we have `additional_remapping` non empty, we may need them to be renamed by later fixes.

Suggestion:

 // Fixes were added in reverse order and need to be applied in that order. 
 // This is because additional_remapping in later blocks may need to be renamed by fixes from earlier blocks.

Previously additional_remappings were not properly remapped due to the
order of `fix` application.
@orizi orizi force-pushed the orizi/fix-match-opt branch from fda005c to 46d647b Compare November 17, 2024 12:13
Copy link
Collaborator Author

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)


crates/cairo-lang-lowering/src/optimizations/match_optimizer.rs line 82 at r1 (raw file):

    // Fixes were added in reverse order, but we still need to add them at the reverse order, as if
    // we have `additional_remapping` non empty, we may need them to be renamed by later fixes.

Done.

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 3 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @orizi)

@orizi orizi added this pull request to the merge queue Nov 17, 2024
Merged via the queue into main with commit f8330d0 Nov 17, 2024
47 of 48 checks passed
@orizi orizi deleted the orizi/fix-match-opt branch November 18, 2024 08:19
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.

3 participants