-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Stop renumbering statements in inference proper #48022
Conversation
@nanosoldier |
Your benchmark job has completed - no performance regressions were detected. A full report can be found here. |
f346350
to
3f0b8ce
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.
Well, if I remember correctly, our optimization pass doesn't have an ability to remove dead control flow, so we still want to have this reachability-based optimization enabled?
@@ -742,13 +742,9 @@ function type_annotate!(interp::AbstractInterpreter, sv::InferenceState, run_opt | |||
body[i] = annotate_slot_load!(undefs, i, sv, expr) # 1&2 | |||
ssavaluetypes[i] = widenslotwrapper(ssavaluetypes[i]) # 4 | |||
else # i.e. any runtime execution will never reach this statement | |||
any_unreachable = true |
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.
Maybe move this assignment into the else
block below?
That's true for things during the optimization, but one of the first things it does it schedule the reachable basic blocks into dominance order, which drops unreachable code. |
SGTM. It was odd to have this optimization here |
I don't think there's any good reason to try to delete the statements here. The very next thing we do is to convert to IRCode which drops dead code anyway, so this just seems redundant. In addition, it complicates Cthulhu-like analysis, which now has to track an extra set of statement numbers.
3f0b8ce
to
908bc08
Compare
I don't think there's any good reason to try to delete the statements here. The very next thing we do is to convert to IRCode which drops dead code anyway, so this just seems redundant. In addition, it complicates Cthulhu-like analysis, which now has to track an extra set of statement numbers.
After JuliaLang/julia#48022 the renumbering of `interp.remarks` and `interp.effects` are unnecessary. This may lead to printing them on wrong statements.
After JuliaLang/julia#48022 the renumbering of `interp.remarks` and `interp.effects` are unnecessary. This may lead to printing them on wrong statements.
I don't think there's any good reason to try to delete the statements here. The very next thing we do is to convert to IRCode which drops dead code anyway, so this just seems redundant. In addition, it complicates Cthulhu-like analysis, which now has to track an extra set of statement numbers.