diff options
| author | Celina G. Val <celinval@amazon.com> | 2024-06-12 16:01:38 -0700 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2024-06-12 16:01:38 -0700 |
| commit | c8c6598f17128b3ac1ec3573dc54876d24cc7a77 (patch) | |
| tree | dedec8dd7b91118a41398e9cffd6469a62f34528 /compiler/stable_mir/src/compiler_interface.rs | |
| parent | 0285dab54f87120367f5693174136aff24b74640 (diff) | |
| download | rust-c8c6598f17128b3ac1ec3573dc54876d24cc7a77.tar.gz rust-c8c6598f17128b3ac1ec3573dc54876d24cc7a77.zip | |
Unify intrinsics body handling in StableMIR
rust-lang/rust#120675 introduced a new mechanism to declare intrinsics which will potentially replace the rust-intrinsic ABI. The new mechanism introduces a placeholder body and mark the intrinsic with #[rustc_intrinsic_must_be_overridden]. In practice, this means that backends should not generate code for the placeholder, and shim the intrinsic. The new annotation is an internal compiler implementation, and it doesn't need to be exposed to StableMIR users. In this PR, intrinsics marked with `rustc_intrinsic_must_be_overridden` are handled the same way as intrinsics that do not have a body.
Diffstat (limited to 'compiler/stable_mir/src/compiler_interface.rs')
| -rw-r--r-- | compiler/stable_mir/src/compiler_interface.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/stable_mir/src/compiler_interface.rs b/compiler/stable_mir/src/compiler_interface.rs index 085dfd9ea89..3e138e3c2e0 100644 --- a/compiler/stable_mir/src/compiler_interface.rs +++ b/compiler/stable_mir/src/compiler_interface.rs @@ -94,10 +94,6 @@ pub trait Context { /// Retrieve the plain function name of an intrinsic. fn intrinsic_name(&self, def: IntrinsicDef) -> Symbol; - /// Returns whether the intrinsic has no meaningful body and all backends - /// need to shim all calls to it. - fn intrinsic_must_be_overridden(&self, def: IntrinsicDef) -> bool; - /// Retrieve the closure signature for the given generic arguments. fn closure_sig(&self, args: &GenericArgs) -> PolyFnSig; |
