-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JIT: refactor jump threading to prepare for allowing side effects #60884
JIT: refactor jump threading to prepare for allowing side effects #60884
Conversation
Update jump threading so that whenever possible it re-uses the original block, rather than bypassing it. This lays the groundwork for a subsequent change that will allow jump threading when the block with the threadable jump has side effects. Also handle the case where we have both a fall through pred and an ambiguous pred, by treating the fall through pred as ambiguous.
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsUpdate jump threading so that whenever possible it re-uses the original Also handle the case where we have both a fall through pred and an ambiguous
|
cc @dotnet/jit-contrib Notes on diffs: a few cases where we do more jump threading (since we now "handle" the amb+ft case), and a few others where we stop doing a CSE as we clean up block more often and so delete a redundant expression occurrence. aspnet.run.windows.x64.checked.mch:
Detail diffs
benchmarks.run.windows.x64.checked.mch:
Detail diffs
coreclr_tests.pmi.windows.x64.checked.mch:
Detail diffs
libraries.crossgen2.windows.x64.checked.mch:
Detail diffs
libraries.pmi.windows.x64.checked.mch:
Detail diffs
libraries_tests.pmi.windows.x64.checked.mch:
Detail diffs
|
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 there a before/after flow graph picture that would help explain the change?
// a new block to allow changing that fall through to a jump, so if we have | ||
// both a pred that is not a true pred, and a fall through, we defer optimizing | ||
// the fall through pred as well. | ||
// * We note if there is an un-ambiguous that pred falls through to block. |
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.
"We note if there is an un-ambiguous that pred" => missing word after "ambiguous"?
// per (4) below. | ||
// | ||
// (4) If we don't have an ambiguous pred, and we have a fall through, we leave | ||
// all preds in the fall through set alone -- they contiuue branching to block. |
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.
typo: contiuue
@BruceForstall is the newly added flow picture enough or do you think it needs something more elaborate? |
Yes, the added picture is helpful. |
Update jump threading so that whenever possible it re-uses the original
block, rather than bypassing it. This lays the groundwork for a subsequent
change that will allow jump threading when the block with the threadable
jump has side effects.
Also handle the case where we have both a fall through pred and an ambiguous
pred, by treating the fall through pred as ambiguous.