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

Iterate inlining and simplification only when we actually inline #138

Merged
merged 1 commit into from
May 11, 2022

Conversation

jwatzman
Copy link
Contributor

The logic used in #133 for when to iterate isn't quite right: it runs
another pass when it detects an inlinable variable, not when it actually
inlines. This means we sometimes run an extra pass (i.e., after removing
an unused variable, we don't need to run another pass) and sometimes run
too few passes (i.e., when inlining a variable we didn't "find"
ourselves, such as an i_blah variable).

Instead, we can use a very similiar technique but detecting when we
actually do the inlining, not the finding.

The logic used in laurentlb#133 for when to iterate isn't quite right: it runs
another pass when it detects an inlinable variable, not when it actually
inlines. This means we sometimes run an extra pass (i.e., after removing
an unused variable, we don't need to run another pass) and sometimes run
too few passes (i.e., when inlining a variable we didn't "find"
ourselves, such as an `i_blah` variable).

Instead, we can use a very similiar technique but detecting when we
actually do the inlining, not the finding.
@laurentlb laurentlb merged commit f769135 into laurentlb:master May 11, 2022
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.

None yet

2 participants