Uh oh!
There was an error while loading. Please reload this page.
Rename rdrnd target feature to rdrand - #48369
Conversation
rust-highfive
commented
Feb 20, 2018
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. |
| // 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.
Typo: s/aplpying/applying
nikomatsakis
commented
Feb 20, 2018
r? @nagisa =) |
nikomatsakis
commented
Feb 20, 2018
BurntSushi
commented
Feb 21, 2018
This seems right to me, and is what Intel refers to upstream. Do we know why LLVM calls this |
nagisa
commented
Feb 21, 2018
Looking at the blame, it seems that |
nagisa
commented
Feb 21, 2018
This is the commit. |
BurntSushi
commented
Feb 21, 2018
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). |
newpavlov
commented
Feb 21, 2018
@alexcrichtonopinion was to follow vendor names. |
nagisa
commented
Feb 21, 2018
@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. |
newpavlov
commented
Feb 22, 2018
@nagisa |
nagisa
commented
Feb 22, 2018
@bors r+ |
bors
commented
Feb 22, 2018
📌 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? |
nagisa
commented
Feb 22, 2018
@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.