From a5b190330912f88c7fe9bda9f10ce80b78159f1f Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 4 Sep 2024 11:37:19 +0200 Subject: [PATCH] Translate `NonDivergingIntrinsic` --- frontend/exporter/src/types/mir.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/frontend/exporter/src/types/mir.rs b/frontend/exporter/src/types/mir.rs index 812f2bea9..af39fc2c0 100644 --- a/frontend/exporter/src/types/mir.rs +++ b/frontend/exporter/src/types/mir.rs @@ -639,6 +639,23 @@ pub enum StatementKind { Nop, } +#[derive_group(Serializers)] +#[derive(AdtInto, Clone, Debug, JsonSchema)] +#[args(<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>>, from: rustc_middle::mir::NonDivergingIntrinsic<'tcx>, state: S as s)] +pub enum NonDivergingIntrinsic { + Assume(Operand), + CopyNonOverlapping(CopyNonOverlapping), +} + +#[derive_group(Serializers)] +#[derive(AdtInto, Clone, Debug, JsonSchema)] +#[args(<'tcx, S: UnderOwnerState<'tcx> + HasMir<'tcx>>, from: rustc_middle::mir::CopyNonOverlapping<'tcx>, state: S as s)] +pub struct CopyNonOverlapping { + pub src: Operand, + pub dst: Operand, + pub count: Operand, +} + #[derive_group(Serializers)] #[derive(Clone, Debug, JsonSchema)] pub struct Place { @@ -986,7 +1003,6 @@ sinto_todo!(rustc_middle::mir, AssertMessage<'tcx>); sinto_todo!(rustc_middle::mir, UnwindAction); sinto_todo!(rustc_middle::mir, FakeReadCause); sinto_todo!(rustc_middle::mir, RetagKind); -sinto_todo!(rustc_middle::mir, NonDivergingIntrinsic<'tcx>); sinto_todo!(rustc_middle::mir, UserTypeProjection); sinto_todo!(rustc_middle::mir, MirSource<'tcx>); sinto_todo!(rustc_middle::mir, CoroutineInfo<'tcx>);