diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-13 13:50:21 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-16 07:07:44 +0000 |
| commit | 0a6b69106eb1df116404a3be123baf100e6cdf21 (patch) | |
| tree | be59199c1e53e0e7c3998c558610a2e4a54c95f6 /compiler/rustc_mir_transform/src/inline.rs | |
| parent | 18bd2dd5cda08b09ace6e37c1a0312e9b2bb4beb (diff) | |
| download | rust-0a6b69106eb1df116404a3be123baf100e6cdf21.tar.gz rust-0a6b69106eb1df116404a3be123baf100e6cdf21.zip | |
Add a query for checking whether a function is an intrinsic.
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 5e6dabeba6d..441b6207717 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -418,8 +418,7 @@ impl<'tcx> Inliner<'tcx> { } } // Don't give intrinsics the extra penalty for calls - let f = tcx.fn_sig(def_id); - if f.abi() == Abi::RustIntrinsic || f.abi() == Abi::PlatformIntrinsic { + if tcx.is_intrinsic(def_id) { cost += INSTR_COST; } else { cost += CALL_PENALTY; |
