Uh oh!
There was an error while loading. Please reload this page.
Transform STRUCT-typed uses of primitives in local morph - #78131
Conversation
ghost
commented
Nov 9, 2022
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
c911fd2CompareSingleAccretion
commented
Nov 10, 2022
This now depends on #76491. |
f532bc1 to
733af07Compare733af07 to
c4fe2f5Comparec4fe2f5 to
320cb8aCompareSingleAccretion
commented
Nov 11, 2022
This is ready for review, but still depends on #76491. @dotnet/jit-contrib |
BruceForstall
commented
Nov 12, 2022
@SingleAccretion Needs conflict resolution |
SingleAccretion
commented
Nov 12, 2022
Also done. |
jakobbotsch
commented
Nov 29, 2022
/azp run runtime-coreclr superpmi-diffs, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
|
Azure Pipelines successfully started running 3 pipeline(s). |
SingleAccretion
commented
Nov 29, 2022
Stress failures:
|
jakobbotsch
left a comment
There was a problem hiding this comment.
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?
SingleAccretion
commented
Nov 30, 2022
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. |
JulieLeeMSFT
commented
Aug 27, 2024
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 - |
JulieLeeMSFT
commented
Aug 27, 2024
Thanks @SingleAccretion for a quick response. I will take a look. |
jakobbotsch
commented
Aug 28, 2024
@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. |
JulieLeeMSFT
commented
Aug 28, 2024
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.