]> git.lizzy.rs Git - rust.git/blobdiff - src/analyze.rs
Start moving away from the intrinsic_match macro
[rust.git] / src / analyze.rs
index 06434bdf69c5aad6731932d688eb791ade21f032..35b89358b1984ee40a2c184a38753987ffbd46f7 100644 (file)
@@ -11,13 +11,13 @@ pub(crate) enum SsaKind {
     Ssa,
 }
 
-pub(crate) fn analyze(fx: &FunctionCx<'_, '_, impl Backend>) -> IndexVec<Local, SsaKind> {
+pub(crate) fn analyze(fx: &FunctionCx<'_, '_, '_>) -> IndexVec<Local, SsaKind> {
     let mut flag_map = fx
         .mir
         .local_decls
         .iter()
         .map(|local_decl| {
-            let ty = fx.monomorphize(&local_decl.ty);
+            let ty = fx.monomorphize(local_decl.ty);
             if fx.clif_type(ty).is_some() || fx.clif_pair_type(ty).is_some() {
                 SsaKind::Ssa
             } else {
@@ -38,19 +38,6 @@ pub(crate) fn analyze(fx: &FunctionCx<'_, '_, impl Backend>) -> IndexVec<Local,
                 _ => {}
             }
         }
-
-        match &bb.terminator().kind {
-            TerminatorKind::Call { destination, .. } => {
-                if let Some((dest_place, _dest_bb)) = destination {
-                    let dest_layout = fx
-                        .layout_of(fx.monomorphize(&dest_place.ty(&fx.mir.local_decls, fx.tcx).ty));
-                    if !crate::abi::can_return_to_ssa_var(fx.tcx, dest_layout) {
-                        not_ssa(&mut flag_map, dest_place.local)
-                    }
-                }
-            }
-            _ => {}
-        }
     }
 
     flag_map