diff options
| author | bors <bors@rust-lang.org> | 2024-11-15 03:29:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-15 03:29:57 +0000 |
| commit | 251dc8ad84492c792a7600d8c5fef2ec868a36a7 (patch) | |
| tree | 408d1872bb5daa7cf37951d812d5f97ee3f76b57 /compiler | |
| parent | 3bc6916f4ca50bb83b211d9013dac38e84618750 (diff) | |
| parent | efe2c44269ecf916d3c200bedfba0b211431d32a (diff) | |
| download | rust-251dc8ad84492c792a7600d8c5fef2ec868a36a7.tar.gz rust-251dc8ad84492c792a7600d8c5fef2ec868a36a7.zip | |
Auto merge of #133059 - workingjubilee:rollup-rc5kvr1, r=workingjubilee
Rollup of 8 pull requests
Successful merges:
- #132790 (Add as_slice/into_slice for IoSlice/IoSliceMut.)
- #132905 ([AIX] Add crate "unwind" to link with libunwind)
- #132977 (Fix compilation error on Solaris due to flock usage)
- #132984 ([illumos] use pipe2 to create anonymous pipes)
- #133019 (docs: Fix missing period and colon in methods for primitive types)
- #133048 (use `&raw` in `{read, write}_unaligned` documentation)
- #133050 (Always inline functions signatures containing `f16` or `f128`)
- #133053 (tests: Fix the SIMD FFI tests with certain x86 configuration)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_transform/src/cross_crate_inline.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/cross_crate_inline.rs b/compiler/rustc_mir_transform/src/cross_crate_inline.rs index 42cbece32d8..589be81558c 100644 --- a/compiler/rustc_mir_transform/src/cross_crate_inline.rs +++ b/compiler/rustc_mir_transform/src/cross_crate_inline.rs @@ -50,6 +50,16 @@ fn cross_crate_inlinable(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { _ => {} } + let sig = tcx.fn_sig(def_id).instantiate_identity(); + for ty in sig.inputs().skip_binder().iter().chain(std::iter::once(&sig.output().skip_binder())) + { + // FIXME(f16_f128): in order to avoid crashes building `core`, always inline to skip + // codegen if the function is not used. + if ty == &tcx.types.f16 || ty == &tcx.types.f128 { + return true; + } + } + // Don't do any inference when incremental compilation is enabled; the additional inlining that // inference permits also creates more work for small edits. if tcx.sess.opts.incremental.is_some() { |
