Skip to content
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

Massively simplify getBaseJitTypeAndSizeOfSIMDType and the general SIMD handle caching/lookup #83228

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

tannergooding
Copy link
Member

This resolves #83091

-- Wanting to get TP numbers to see if the getBaseJitTypeAndSizeOfSIMDType changes in particular are a win. I'm expecting them to be so because we have, on average, less overall checks being done for what used to be both the fast and slow path.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 9, 2023
@ghost ghost assigned tannergooding Mar 9, 2023
@ghost
Copy link

ghost commented Mar 9, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

This resolves #83091

-- Wanting to get TP numbers to see if the getBaseJitTypeAndSizeOfSIMDType changes in particular are a win. I'm expecting them to be so because we have, on average, less overall checks being done for what used to be both the fast and slow path.

Author: tannergooding
Assignees: tannergooding
Labels:

area-CodeGen-coreclr

Milestone: -

@tannergooding
Copy link
Member Author

CC. @jakobbotsch, @dotnet/jit-contrib

This is effectively no change to TP, with there being a very small win on coreclr_tests (-0.01%) for x64.

Massively simplifies the handle lookup and caching logic. -- It could likely have the total LoC reduced even more, if desired, but I didn't feel like creating a CLASS_HANDLE* and then double indirecting to avoid repeated code between the various TYP_SIMD apis...

Also fixes a couple of bugs that existed in the code that caused invalid handles to be returned and so resolves the general issue in 83091. -- There is a separate issue in that a couple gtNewSimdHWIntrinsic calls specify the wrong TYP_SIMD, but I will be fixing that in a follow up PR with a different assert.

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice cleanup.

@tannergooding tannergooding merged commit 6854d37 into dotnet:main Mar 10, 2023
@tannergooding tannergooding deleted the fix-83091 branch March 10, 2023 15:07
@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: gtGetStructHandleIfPresent may return SIMD handles that normalize (via impNormStructType) to wrong types
3 participants