rust/compiler/rustc_mir_transform
Trevor Gross 5d818914af Always inline functions signatures containing f16 or f128
There are a handful of tier 2 and tier 3 targets that cause a LLVM crash
or linker error when generating code that contains `f16` or `f128`. The
cranelift backend also does not support these types. To work around
this, every function in `std` or `core` that contains these types must
be marked `#[inline]` in order to avoid sending any code to the backend
unless specifically requested.

However, this is inconvenient and easy to forget. Introduce a check for
these types in the frontend that automatically inlines any function
signatures that take or return `f16` or `f128`.

Note that this is not a perfect fix because it does not account for the
types being passed by reference or as members of aggregate types, but
this is sufficient for what is currently needed in the standard library.

Fixes: https://github.com/rust-lang/rust/issues/133035
Closes: https://github.com/rust-lang/rust/pull/133037
2024-11-14 16:18:41 -06:00
..
src Always inline functions signatures containing f16 or f128 2024-11-14 16:18:41 -06:00
Cargo.toml compiler: Add is_uninhabited and use LayoutS accessors 2024-10-28 09:58:30 -07:00
messages.ftl Validate and test -Zmir-enable-passes 2024-11-12 13:28:05 +00:00