Skip to content

Commit 270ebfc

Browse files
committed
Tweak comment about intrinsics in cross-crate-inlinable
1 parent d1d3ef4 commit 270ebfc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

compiler/rustc_mir_transform/src/cross_crate_inline.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> {
146146
TerminatorKind::Call { func, unwind, .. } => {
147147
// We track calls because they make our function not a leaf (and in theory, the
148148
// number of calls indicates how likely this function is to perturb other CGUs).
149-
// But intrinsics don't have a body that gets assigned to a CGU, so they are
150-
// ignored.
149+
// But there are a handful of intrinsics such as raw_eq that should not block
150+
// cross-crate-inlining. Adding a broad exception for all intrinsics benchmarks well
151+
// and seems more sustainable than an ever-growing list of intrinsics to ignore.
151152
if let Some((fn_def_id, _)) = func.const_fn_def()
152153
&& find_attr!(tcx, fn_def_id, RustcIntrinsic)
153154
{

0 commit comments

Comments
 (0)