-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Update list of allowed aarch64 features #84665
Conversation
These features were recently added to std_detect. Features not supported by LLVM 9, the current minimum version for Rust, are commented.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @Amanieu |
Btw it's 10 (at least on master) #83387 |
("crc", Some(sym::aarch64_target_feature)), | ||
// Cryptographic extension | ||
("crypto", Some(sym::aarch64_target_feature)), |
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.
LLVM has moved away from a combined "crypto" feature and now uses separate "aes" and "sha2" features. We should do the same here.
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 agree - the crypto feature doesn't really mean much any more and the separate features are better. Wouldn't removing this here affect any users detecting this feature? Likewise with removing it from std_detect.
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.
AArch64 target features are still unstable, so it's fine to rename/remove them.
// FEAT_SVE2_BitPerm | ||
("sve2-bitperm", Some(sym::aarch64_target_feature)), | ||
// FEAT_FRINTTS | ||
("fptoint", Some(sym::aarch64_target_feature)), |
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.
"fptoint" is a poor name for this feature, I prefer the original ARM name "frintts".
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.
Happy to rename this
@@ -152,6 +152,12 @@ pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str { | |||
("x86", "avx512vpclmulqdq") => "vpclmulqdq", | |||
("aarch64", "fp") => "fp-armv8", | |||
("aarch64", "fp16") => "fullfp16", | |||
("aarch64", "fhm") => "fp16fml", | |||
("aarch64", "lse2") => "outline-atomics", |
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.
lse2
doesn't have an LLVM equivalent feature: it doesn't add any new instructions, it just relaxes the restrictions on existing atomic instructions.
outline-atomics
is something different: it's a codegen option on LLVM to call external functions for atomic operations so that they can take advantage of LSE on targets that support it.
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.
Nice catch, thanks a lot!
There happens to be no relevant features added in v10. Though it does mean TME is supported on all supported LLVM versions. |
@adamgemmell any updates on the changes requested? |
@Dylan-DPC here we go Removing crypto is a little weird as there's a dependency on it in stdarch which is a submodule of rust, and of course we're bootstrapping.
|
@bors r+ |
📌 Commit d3737a6 has been approved by |
…nieu Update list of allowed aarch64 features I recently added these features to std_detect for aarch64 linux, pending [review](rust-lang/stdarch#1146). I have commented any features not supported by LLVM 9, the current minimum version for Rust. Some (PAuth at least) were renamed between 9 & 12 and I've left them disabled. TME, however, is not in LLVM 9 but I've left it enabled. See rust-lang/stdarch#993
⌛ Testing commit d3737a6 with merge feda7ff79fcad3576c95c6336638c2398ac44b29... |
💔 Test failed - checks-actions |
This looks like https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/No.20macos.20runners.20for.20bors.3F Could I get an @bors retry please? |
@adamgemmell: 🔑 Insufficient privileges: not in try users |
@bors retry |
☀️ Test successful - checks-actions |
I recently added these features to std_detect for aarch64 linux, pending review.
I have commented any features not supported by LLVM 9, the current minimum version for Rust. Some (PAuth at least) were renamed between 9 & 12 and I've left them disabled. TME, however, is not in LLVM 9 but I've left it enabled.
See rust-lang/stdarch#993