-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 SIMD-typed partial access to locals; delete base types from vector constants #74580
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsEnabling the folding of We have positive diffs due to more CSEs, some light regressions due to more CSEs, and a couple large regressions due to more unrolling ( Closes #70052.
|
58307dd
to
e2bbb55
Compare
@dotnet/jit-contrib |
e2bbb55
to
419de60
Compare
To be used for nodes which don't have a handle of thier own.
419de60
to
b402708
Compare
CORINFO_CLASS_HANDLE* pCanonicalHnd = nullptr; | ||
switch (size) | ||
{ | ||
case 8: | ||
pCanonicalHnd = &m_simdHandleCache->CanonicalSimd8Handle; | ||
break; | ||
case 12: | ||
// There is no need for a canonical SIMD12 handle because it is always Vector3. | ||
break; | ||
case 16: | ||
pCanonicalHnd = &m_simdHandleCache->CanonicalSimd16Handle; | ||
break; | ||
case 32: | ||
pCanonicalHnd = &m_simdHandleCache->CanonicalSimd32Handle; | ||
break; | ||
default: | ||
unreached(); | ||
} | ||
|
||
if ((pCanonicalHnd != nullptr) && (*pCanonicalHnd == NO_CLASS_HANDLE)) | ||
{ | ||
*pCanonicalHnd = typeHnd; | ||
} |
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.
So essentially the first SIMD handle we see in this function becomes the canonical handle for this compilation?
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.
Yep. It's a workaround of course, but doing this "properly" would imply breaking the assumption that (most / all that are looked at) varTypeIsStruct
locals have handles. Which is work that will be done at some point, but not now.
/azp run runtime-coreclr superpmi-diffs |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures are #76041 according to build analysis. |
…rom vector constants (dotnet#74580)" This reverts commit 78443b8.
Enabling the folding of
SIMD
-typed indirs in local morph, it was observed that some CSEs were getting lost. The reason was that we always usedFLOAT
-derived handles forTYP_SIMD
IND
/LCL_FLD
nodes, which would not be available in methods that only usedVector128<int>
(for example). This change enhances the "canonical handle" logic to capture handles of other types to use for handle-less nodes.We have positive diffs due to more CSEs, some light regressions due to more CSEs, and a couple large regressions due to more unrolling (
IND<simd>
appears cheaper togtSetEvalOrder
thanOBJ<simd>
).Closes #70052.