-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix impBoxPatternMatch
#68382
Fix impBoxPatternMatch
#68382
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsThe issue was that the code assumes that we only need to hold onto the original address tree in case a null check is needed, which is not the case -- the address could be both non-null and itself side-effecting (e. g. The narrow fix would have been to disallow side-effecting addresses, but I went for the more general improvement of spilling the side effecting tree as unused value instead, because it makes the code simpler, and will avoid diffs for one of the future changes. So, we're expecting diffs - some size regressions that are actually PerfScore improvements due to new CSEs.
|
@dotnet/jit-contrib I would like to request a re-run of the SPMI diffs for this change. It failed to download the Jits from the rolling build it seems:
(I've noticed this started happening quite often in the last few days) |
/azp run runtime-coreclr superpmi-diffs |
Azure Pipelines successfully started running 1 pipeline(s). |
7f52d60
to
fdf1fd8
Compare
Any reason not to spill for the other patterns as well? Then we could remove the the special handling for byref-like types before this function is called. |
Nothing that I would think of I suppose, I'll make the changes. |
fdf1fd8
to
fbc579b
Compare
BOX;BR[COND]
pattern matchimpBoxPatternMatch
fbc579b
to
98fe2a5
Compare
98fe2a5
to
741f5c7
Compare
impBoxPatternMatch
impBoxPatternMatch
I have scaled back the change to the narrow correctness fix, as tying together the many ways of how unused values can be transformed while avoiding regressions proved a little fruitless. DetailsThere are 4 ways an unused tree can be transformed:
It so happens that for different trees the different strategies produce different results CQ-wise, due to the differences in how friendly a given shape is to CSE and morph's dead code removal. This area is full of quirky behavior, so I decided to leave it be for now. |
The @dotnet/jit-contrib |
That one is #69114 so not related. |
For the
BOX;BR[COND]
case, the issue was that the code assumed that we only need to hold onto the original address tree in case a null check is needed, which is not the case -- the address could be both non-null and itself side-effecting (e. g.ADDR(INDEX)
).Diffs.