-
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
Fold full-width SIMD-typed indirections #76745
Fold full-width SIMD-typed indirections #76745
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsI. e.
|
dcca3cd
to
22e9c1c
Compare
@dotnet/jit-contrib We're getting close to completing the "fold all indirect access in local morph" part of the |
doesn't sound good 😄 luckily, they're negative in fact! |
Do you want to run some outerloop here? Since over the last few weeks it was constantly in a bad shape we try to run them in all potentially impactful PRs explicitly |
Yeah, seems a good idea ([libraries-]stress would be the pipelines I suppose).
I have a questionable habit of characterizing diffs by their "niceness" 😄. |
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
I looked at the stress failures, all looked pre-existing, except one on ARM:
I looked at the dump, and what we have there is a function being inlined, of which the first parameter is a reference type, but when looking at the signature, we get, rather mysteriously,
Will assume not related as there are no SIMD types on ARM. Will also hold off on resolving the conflicts until the CI is up. |
We should really delete the SIMD "InitObj" IR form, but that change had some unfortunate regressions to it, so, for now, just make it work reliably.
22e9c1c
to
f288eeb
Compare
Looks like there are a couple SPMI failures that will need to be investigated. |
ed45b7a
to
f289c26
Compare
Consider a promoted two-field HFA stack argument on ARM64. This argument needs to be processed by multi-reg morphing, so that it is transformed into a FIELD_LIST, otherwise it would end up independently promoted yet appear in the IR as a LCL_VAR. That was not happening because the number of stack slots consumed by such an argument is 1 (8 bytes), and the number of registers is zero (naturally). As the fix, use the more obviously correct check based on "structBaseType" to detect when we need to invoke multi-reg morphing. No diffs.
f289c26
to
1394fc0
Compare
The issues have been solved and this is once again ready for review. |
#if !defined(TARGET_X86) | ||
else | ||
{ | ||
hasMultiregStructArgs = true; |
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.
Why is this needed here now?
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.
It used to be set below:
#if FEATURE_MULTIREG_ARGS
if (isStructArg)
{
if (((arg.AbiInfo.NumRegs + arg.AbiInfo.GetStackSlotsNumber()) > 1) ||
(isHfaArg && argx->TypeGet() == TYP_STRUCT))
{
hasMultiregStructArgs = true;
}
}
So this is just moving it to here. The benefit of this location is that we don't need to invoke multi-reg morphing if we have already transformed everything into FIELD_LIST
s.
call->gtArgs.SetTemp(&arg, tmp); | ||
lvaSetVarAddrExposed(tmp DEBUGARG(AddressExposedReason::TOO_CONSERVATIVE)); | ||
hasMultiregStructArgs |= ((arg.AbiInfo.ArgType == TYP_STRUCT) && !arg.AbiInfo.PassedByRef); |
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.
I assume this was a preexisting issue on platforms with by-value struct args?
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.
No, as with https://github.com/dotnet/runtime/pull/76745/files#r1009281151, this was just moved.
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.
LGTM, nice clean up too.
I. e.
OBJ/IND<simd>(ADDR(LCL_VAR<simd>))
.Some positive (in nature) diffs, with a TP win as well.