-
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
Add predefined cpu names for --instruction-set (e.g. haswell) #71911
Conversation
Both ILC and crossgen can print out all allowed values for instruction-set (the ILC one starts around here:
|
How was the set of (only 7) targets selected; based on their popularity or some other metric? For reference (x86):
|
Yeah, just popularity from my opinion, I've seen mostly But I can add more, just didn't want to display a lot of irrelevant stuff in the help such as e.g. Another story is avx512 but we don't support that (except AvxVnni) |
@kant2002 I am leaving that up-for-grabs, it requires cpu-feature detection logic which is pretty bulky (for all platforms/archs) |
@EgorBo having this up-for-grabs is find for me. Just want to make sure that this aligned with overall goals and would be valuable addition. |
|
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.
Thanks
src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
Outdated
Show resolved
Hide resolved
@tannergooding could you please re-review, did I address your feedback? |
src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
Outdated
Show resolved
Hide resolved
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.
Thanks for the fixes. The current set looks correct to me according to the combination of official docs and what LLVM uses.
Happy for the crypto sets to be added if we talk with our friends at Intel/AMD/Arm first and get clarification.
This PR adds a few known CPUs as named groups of instructions sets. A similar approach is used in Clang/LLVM (e.g.
-march=skylake
). It allows us to quickly specify instruction sets instead of listing all of them, e.g.:which is a sort of "generate me a binary for any modern x86 cpu". Instead of what we do today:
and the following functions:
will be prejitted to:
TODO: Implement
native
group name, but it's a way more complicated, not in this PR.cc @dotnet/crossgen-contrib, @dotnet/ilc-contrib @tannergooding