Skip to content

Commit a775fd6

Browse files
committed
Auto merge of rust-lang#130197 - RalfJung:interp-perf, r=<try>
experiment: see where the perf regressions in rust-lang#129778 come from Let's see if we can figure out what caused the perf impact in rust-lang#129778. There are some extra functions in a few places so maybe more `inline(always)` helps... r? `@saethlin`
2 parents f827364 + 0852bf2 commit a775fd6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler/rustc_const_eval/src/interpret/operand.rs

+2
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ impl<'tcx, Prov: Provenance> Projectable<'tcx, Prov> for ImmTy<'tcx, Prov> {
433433
Ok(self.offset_(offset, layout, ecx))
434434
}
435435

436+
#[inline(always)]
436437
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
437438
&self,
438439
_ecx: &InterpCx<'tcx, M>,
@@ -522,6 +523,7 @@ impl<'tcx, Prov: Provenance> Projectable<'tcx, Prov> for OpTy<'tcx, Prov> {
522523
}
523524
}
524525

526+
#[inline(always)]
525527
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
526528
&self,
527529
_ecx: &InterpCx<'tcx, M>,

compiler/rustc_const_eval/src/interpret/place.rs

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ impl<'tcx, Prov: Provenance> Projectable<'tcx, Prov> for MPlaceTy<'tcx, Prov> {
166166
Ok(MPlaceTy { mplace: self.mplace.offset_with_meta_(offset, mode, meta, ecx)?, layout })
167167
}
168168

169+
#[inline(always)]
169170
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
170171
&self,
171172
_ecx: &InterpCx<'tcx, M>,
@@ -299,6 +300,7 @@ impl<'tcx, Prov: Provenance> Projectable<'tcx, Prov> for PlaceTy<'tcx, Prov> {
299300
})
300301
}
301302

303+
#[inline(always)]
302304
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
303305
&self,
304306
ecx: &InterpCx<'tcx, M>,
@@ -560,6 +562,7 @@ where
560562

561563
/// Given a place, returns either the underlying mplace or a reference to where the value of
562564
/// this place is stored.
565+
#[inline(always)]
563566
fn as_mplace_or_mutable_local(
564567
&mut self,
565568
place: &PlaceTy<'tcx, M::Provenance>,

0 commit comments

Comments
 (0)