-
Notifications
You must be signed in to change notification settings - Fork 445
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
StrengthReduction ignores side-effects in function calls #2221
Comments
@fruffy : is this stf file the expected output? |
Fixed. There was some bug with the tool I was using to generate these. |
you should probably write a stronger test; this one will still work if one of the calls is eliminated. |
Is that list of optimizations even exhaustive? What other expressions could lead to this? |
Feel free to review my PR for fixing this. I hope I have covered all cases, but who knows? |
StrengthReduction
(orPassRepeated
in the latest version) transforms the following program:into
which ignores the side effects in the method-call expression.
zero_op_with_side_effects.p4.txt
zero_op_with_side_effects.stf.txt
The text was updated successfully, but these errors were encountered: