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

Move GenTreeVecCon and GenTreeMskCon under the respective FEATURE_* defines #104932

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

tannergooding
Copy link
Member

Follow up from #104875

@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 Jul 16, 2024
Copy link
Contributor

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

@tannergooding tannergooding marked this pull request as ready for review July 16, 2024 17:48
@tannergooding tannergooding added this to the 10.0.0 milestone Jul 25, 2024
@tannergooding
Copy link
Member Author

This represents just general cleanup and can be delayed until .NET 10

@tannergooding
Copy link
Member Author

CC. @kunalspathak, this should be ready for review.

Just represents the general cleanup we had talked about around the constants and ensuring they're under the right #define

@jakobbotsch
Copy link
Member

Don't our most important targets have these defined? Is there a tangible benefit from doing something like this? From what I see it's just introducing a lot of ifdef soup that makes the code harder to read. I would personally like if we moved toward fewer conditionally defined nodes/opers rather than more of them, except if there are some really tangible benefits.

cc @dotnet/jit-contrib

@tannergooding
Copy link
Member Author

Don't our most important targets have these defined?

Yes, at least for FEATURE_SIMD. For our official targets I believe just UNIX_X86 and ARM32 don't support it. There's more that don't when you factor in community targets.

I would personally like if we moved toward fewer conditionally defined nodes/opers rather than more of them, except if there are some really tangible benefits.

I don't disagree.

SIMD is really a fundamental part of the ABI. HW_INTRINSICS (and MASKED_HW_INTRINSICS) are then built on top of the SIMD feature, and its something that's so integral to perf in the BCL that not having it is a huge detriment to the user experience.

We somewhat have the split due to historical reasons and it would be nice if we merged them together into a single feature, but it won't remove most of the ifdef soup while we have targets without SIMD support.

With this PR, we're not really introducing any new ifdef soup and it actually simplifies it in other cases. The places it remains soupy are mainly the places we have to do different things for SIMD vs no SIMD.

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

@tannergooding
Copy link
Member Author

@jakobbotsch do you have any other input on this one?

My preference would be to take this, given it makes our build given existing defines more correct. Then to separately look at (and come to a shared decision with the JIT team) as to how we want to simplify it, if at all.

There's a couple of older issues that allude to such a cleanup: #9473 and #11701, but we've never actually determined what should actually be done. Such a cleanup (when/if it happens) will likely be quite a bit more involved

@jakobbotsch
Copy link
Member

jakobbotsch commented Nov 8, 2024

If your preference is to take it I am ok with it, but at some point I might experiment with the clean up that goes in the opposite direction and makes all node types and node classes unconditionally defined everywhere (just not appearing for some targets).

@tannergooding tannergooding merged commit 5d9d6f5 into dotnet:main Nov 8, 2024
111 checks passed
@tannergooding tannergooding deleted the cns_vecmsk branch November 8, 2024 18:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2024
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.

3 participants