-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Yul dataflow analysis for continue/break statements #6242
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
Conversation
a1e6687
to
1247d77
Compare
This comment has been minimized.
This comment has been minimized.
d6f6276
to
099ab29
Compare
53b820a
to
7086402
Compare
This comment has been minimized.
This comment has been minimized.
7086402
to
efbcb59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this WIP now? I see some come vanished :p
test/libyul/yulOptimizerTests/commonSubexpressionEliminator/for_continue.yul
Outdated
Show resolved
Hide resolved
The code vanished because it turned out that we actually do not have to do anything. Would be great if you could verify that, @leonardoalt |
Ok I see. It would be nice to have tests showing that. |
efbcb59
to
582cc73
Compare
50cded3
to
86bf721
Compare
86bf721
to
29ccbd5
Compare
{ | ||
let a | ||
let b | ||
for {let i := 0} lt(i, 10) {i := add(a, b) b := origin()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, unfortunately, I don't remember anymore which aspect this was supposed to test..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriseth the motivation behind this, yesterday, was, to test for loops with continue statements modifying a used variable in the post-block (b := origin()
). Maybe I should have chosen a different value?
29ccbd5
to
524e133
Compare
test/libyul/yulOptimizerTests/rematerialiser/for_continue_with_assignment_in_post.yul
Outdated
Show resolved
Hide resolved
…nts just like without.
524e133
to
57bcb8b
Compare
Adds data flow analysis for break & continue statements. This PR is rebased on top of #6136.