-
Notifications
You must be signed in to change notification settings - Fork 12.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
Rename rdrnd target feature to rdrand #48369
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (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. |
src/librustc_trans/llvm_util.rs
Outdated
// WARNING: the features must be known to LLVM or the feature | ||
// detection code will walk past the end of the feature array, | ||
// leading to crashes. | ||
// WARNING: the features after aplpying `to_llvm_feature` must be known |
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.
Typo: s/aplpying/applying
r? @nagisa =) |
This seems right to me, and is what Intel refers to upstream. Do we know why LLVM calls this |
Looking at the blame, it seems that |
This is the commit. |
Ug, so you're saying other compiler front ends use
I'm not really a fan of any of these, but I feel myself leaning toward (1). |
@alexcrichton opinion was to follow vendor names. |
@newpavlov that was an opinion in context of llvm vs vendor and not gcc/clang vs vendor, though. I can say for sure that I was super surprised that +rdrand didn’t work and took me a while to figure out that it is in fact +rdrnd, so I’m certainly in favour of this change. |
@nagisa |
@bors r+ |
📌 Commit a33c1da has been approved by |
I'm still not convinced that this is the right path to take. Being different from the vendor stinks, but being different from other mainstream compiler front ends also stinks (which is very different from eschewing LLVM names specifically, which I'd be totally fine with). I didn't see any consideration given to supporting both? |
@BurntSushi well, it is something relevant to more than just rdrand, and is something we should decide about in context of all features. If we decide to have aliases for compatibility with other compilers, we can simply add the cases for all the features at the same time. |
Rename rdrnd target feature to rdrand Plus minor cleanup. Related stdsimd [issue](rust-lang/stdarch#325).
Rename rdrnd target feature to rdrand Plus minor cleanup. Related stdsimd [issue](rust-lang/stdarch#325).
Plus minor cleanup.
Related stdsimd issue.