Skip to content

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.

2 participants