-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: Insert readbacks eagerly in physical promotion #87809
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
Conversation
Physical promotion currently inserts readbacks (reading the struct local back into the field local) as COMMAs right before a local that needs it. This is not right for QMARKs where it may mean we only end up reading back the local in one of the branches. This change makes physical promotion insert readbacks as new statements before any statement that is going to need it. While we could do this for QMARKs only, it is done for any statement indiscriminately since it has two benefits: 1. It allows forward-sub to kick in for the readbacks, which can lead to a contained LCL_FLD 2. It stops us from disabling local copy prop by avoiding the creation of embedded stores. The existing logic is still necessary to keep in case the readback was marked within the same tree. Fix dotnet#87508
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsPhysical promotion currently inserts readbacks (reading the struct local back into the field local) as COMMAs right before a local that needs it. This is not right for QMARKs where it may mean we only end up reading back the local in one of the branches. This change makes physical promotion insert readbacks as new statements before any statement that is going to need it. While we could do this for QMARKs only, it is done for any statement indiscriminately since it has two benefits:
The existing logic is still necessary to keep in case the readback was marked within the same tree. Fix #87508
|
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-jit-experimental |
Azure Pipelines successfully started running 3 pipeline(s). |
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
Physical promotion currently inserts readbacks (reading the struct local back into the field local) as COMMAs right before a local that needs it. This is not right for QMARKs where it may mean we only end up reading back the local in one of the branches.
This change makes physical promotion insert readbacks as new statements before any statement that is going to need it. While we could do this for QMARKs only, it is done for any statement indiscriminately since it has two benefits:
The existing logic is still necessary to keep in case the readback was marked within the same tree.
Fix #87508
Fix #87506
Fix #87755