-
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
Transform STRUCT
-typed uses of primitives in local morph
#78131
Transform STRUCT
-typed uses of primitives in local morph
#78131
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsAnd update global morph accordingly. This mainly involves giving not DNER-ing local fields right away, but waiting for global morph to do this, after it has had a chance to transform the field into an Diffs are a bit mixed, due to requiring the substitution workaround but generally positive, and overall minor.
|
0c36c00
to
c911fd2
Compare
This now depends on #76491. |
f532bc1
to
733af07
Compare
733af07
to
c4fe2f5
Compare
c4fe2f5
to
320cb8a
Compare
This is ready for review, but still depends on #76491. @dotnet/jit-contrib |
@SingleAccretion Needs conflict resolution |
Also done. |
/azp run runtime-coreclr superpmi-diffs, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 3 pipeline(s). |
Stress failures:
|
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.
Looks great to me, very nice to no longer have to think about these cases after local morph.
Are you going to optimize other uses (e.g. the liveness change we discussed) in a follow-up?
Yep. |
Hi @SingleAccretion, we are trying to clean up TODO comments. You touched this part of the code in this PR, runtime/src/coreclr/jit/morph.cpp Lines 11154 to 11167 in 7ff684a
genReturnBB != nullptr .#11413 is now supported.
|
BTW, the bitconverter instructions from #11413 does not hit this code path. |
@JulieLeeMSFT it requires removing the property that allows "ABI-compatible" types under a
If this could be transformed by morph into something like:
The common return local path would get mismatched types:
It is why this optimization is only done when we don't have a common return local - |
Thanks @SingleAccretion for a quick response. I will take a look. |
@JulieLeeMSFT This won't be a simple fix. It overlaps with the work I need to do to enable better ABI treatment with physical promotion, and hopefully I can get to that by .NET 10. |
Sounds good. I will do that. |
And update global morph accordingly. This mainly involves not DNER-ing struct local fields right away, but waiting for global morph to do this, after it has had a chance to transform the field into an
LCL_VAR
.Diffs are a bit mixed, due to requiring the substitution workaround but generally positive, and overall minor. The larger regressions in tests are due to us setting some DNERs later, thus expanding things into field-by-field copies more.
Note: this change is best reviewed with the "don't show whitespace diffs" setting.