Auto merge of #130197 - RalfJung:interp-perf, r=saethlin
interpret: mark some hot functions inline(always) That seems to recover a good part of the perf impact of https://github.com/rust-lang/rust/pull/129778. r? `@saethlin`
This commit is contained in:
commit
5bce6d48ff
@ -433,6 +433,7 @@ fn offset_with_meta<M: Machine<'tcx, Provenance = Prov>>(
|
||||
Ok(self.offset_(offset, layout, ecx))
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
|
||||
&self,
|
||||
_ecx: &InterpCx<'tcx, M>,
|
||||
@ -522,6 +523,7 @@ fn offset_with_meta<M: Machine<'tcx, Provenance = Prov>>(
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
|
||||
&self,
|
||||
_ecx: &InterpCx<'tcx, M>,
|
||||
|
@ -166,6 +166,7 @@ fn offset_with_meta<M: Machine<'tcx, Provenance = Prov>>(
|
||||
Ok(MPlaceTy { mplace: self.mplace.offset_with_meta_(offset, mode, meta, ecx)?, layout })
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
|
||||
&self,
|
||||
_ecx: &InterpCx<'tcx, M>,
|
||||
@ -299,6 +300,7 @@ fn offset_with_meta<M: Machine<'tcx, Provenance = Prov>>(
|
||||
})
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn to_op<M: Machine<'tcx, Provenance = Prov>>(
|
||||
&self,
|
||||
ecx: &InterpCx<'tcx, M>,
|
||||
@ -560,6 +562,7 @@ pub fn eval_place(
|
||||
|
||||
/// Given a place, returns either the underlying mplace or a reference to where the value of
|
||||
/// this place is stored.
|
||||
#[inline(always)]
|
||||
fn as_mplace_or_mutable_local(
|
||||
&mut self,
|
||||
place: &PlaceTy<'tcx, M::Provenance>,
|
||||
|
Loading…
Reference in New Issue
Block a user