-
Notifications
You must be signed in to change notification settings - Fork 13.3k
remove the simple_llvm_intrinsic
wrappers
#10730
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
Conversation
I've been on the fence about this for awhile. I think this is actually the third time I've seen this come up! I certainly like the negative diffstat on this, but I do think that there's a possibly major downside to this. As you've mentioned in #10008, none of these intrinsics are really unsafe at all (at least all the math ones). If we move to using It also seems a little odd to have half the intrinsics in the compiler and half of them using |
@alexcrichton: I think forcing all C and LLVM functions don't match the Rust ABI since they're missing an environment pointer so for now you still do need a wrapper anyway... but at least most of those wrappers are already there to deal with the current |
Interesting, I feel like this pull request should have the same fate as #10267 in that case, I will nominate that for discussion. |
This removes a layer of generated wrappers from native LLVM intrinsics we can represent directly in the type system. There are a lot with `i1` parameters so there's still a need for those to be in the compiler. These are an implementation detail of the compiler, so the inconsistency is worth the simplification and faster compiles.
This does prevent the standard library from being built with a hypothetical non-LLVM backend (or at least the intrinsics need to be declared differently per backend). |
Yeah, it makes this implementation of the standard library less portable, but the core language definition becomes smaller so an alternate implementation would have a bit less to do. I would like to feature-gate |
A hearty 👍 on this |
We have decided to close #10267, and as a result I agree with @brson that using the |
`imprecise_flops`: Globally ignore `#[no_std]` crates Really small fix. Fixes rust-lang#10728 changelog: [`imprecise_flops`]: Fix false positives with `#[no_std]`
This removes a layer of generated wrappers from native LLVM intrinsics
we can represent directly in the type system. There are a lot with
i1
parameters so there's still a need for those to be in the compiler.
These are an implementation detail of the compiler, so the inconsistency
is worth the simplification and faster compiles.