-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Fix invalid zero-init suppression for untracked variables #91580
Conversation
optRemoveRedundantZeroInits has logic to remove unnecessary zero inits if we can determine that the local will be zeroed in the prolog. In addition, it also has logic to suppress the prolog zero init if there is a dominating initialization already. The latter logic was trying to reason about liveness for untracked locals, which does not make sense. Fix dotnet#91576
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsoptRemoveRedundantZeroInits has logic to remove unnecessary zero inits if we can determine that the local will be zeroed in the prolog. In addition, it also has logic to suppress the prolog zero init if there is a dominating initialization already. The latter logic was trying to reason about liveness for untracked locals, which does not make sense. Fix #91576
|
This sadly has some quite significant regressions, will see if I can address some of these. |
cc @dotnet/jit-contrib PTAL @AndyAyersMS Diffs where we now need to zero init in some cases again. |
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.
Are the handful cases where we now do less zero init ones where there were no eh successors?
Yep, for example in https://github.com/dotnet/runtime/blob/cf65ea21bfcb4f53a416506d43d79900413e5b1b/src/tests/JIT/Regression/JitBlue/Runtime_85892/Runtime_85892.cs It seems like we could be even more precise by tracking the set of locals that are actually live to handlers we have seen and only disqualifying those in this optimization, though I doubt it would be significantly better than what we have with this PR. |
/azp run runtime-coreclr superpmi-diffs |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr superpmi-diffs |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, Fuzzlyn |
Azure Pipelines successfully started running 3 pipeline(s). |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6131654931 |
optRemoveRedundantZeroInits has logic to remove unnecessary zero inits if we can determine that the local will be zeroed in the prolog. In addition, it also has logic to suppress the prolog zero init if there is a dominating initialization already. The latter logic was trying to reason about liveness for untracked locals, which does not make sense.
Fix #91576
Also makes the handling for potential implicit control flow more precise, to counteract regressions.