JIT: refactor jump threading to prepare for allowing side effects#60884
JIT: refactor jump threading to prepare for allowing side effects#60884AndyAyersMS merged 3 commits intodotnet:mainfrom
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 diffsbenchmarks.run.windows.x64.checked.mch:Detail diffscoreclr_tests.pmi.windows.x64.checked.mch:Detail diffslibraries.crossgen2.windows.x64.checked.mch:Detail diffslibraries.pmi.windows.x64.checked.mch:Detail diffslibraries_tests.pmi.windows.x64.checked.mch:Detail diffs |
BruceForstall
left a comment
There was a problem hiding this comment.
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.
"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. |
|
@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.