diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-01-12 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-01-12 18:51:31 +0100 |
| commit | 000b36c505a8865322c376486791cdee8f38d0c5 (patch) | |
| tree | 3efb3d84c08ebe0f3d2e43eeeac59dbc5f79b0b2 /compiler/rustc_passes | |
| parent | 72e74d7b9cf1a7901650227e74650f1fcc797600 (diff) | |
| download | rust-000b36c505a8865322c376486791cdee8f38d0c5.tar.gz rust-000b36c505a8865322c376486791cdee8f38d0c5.zip | |
Remove deprecated LLVM-style inline assembly
Diffstat (limited to 'compiler/rustc_passes')
| -rw-r--r-- | compiler/rustc_passes/src/liveness.rs | 36 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/naked_functions.rs | 16 |
2 files changed, 0 insertions, 52 deletions
diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index 9ee305b712f..4660d047885 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -103,7 +103,6 @@ use rustc_span::Span; use std::collections::VecDeque; use std::io; use std::io::prelude::*; -use std::iter; use std::rc::Rc; mod rwu_table; @@ -470,7 +469,6 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> { | hir::ExprKind::Struct(..) | hir::ExprKind::Repeat(..) | hir::ExprKind::InlineAsm(..) - | hir::ExprKind::LlvmInlineAsm(..) | hir::ExprKind::Box(..) | hir::ExprKind::Type(..) | hir::ExprKind::Err @@ -1091,26 +1089,6 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { succ } - hir::ExprKind::LlvmInlineAsm(ref asm) => { - let ia = &asm.inner; - let outputs = asm.outputs_exprs; - let inputs = asm.inputs_exprs; - let succ = iter::zip(&ia.outputs, outputs).rev().fold(succ, |succ, (o, output)| { - // see comment on places - // in propagate_through_place_components() - if o.is_indirect { - self.propagate_through_expr(output, succ) - } else { - let acc = if o.is_rw { ACC_WRITE | ACC_READ } else { ACC_WRITE }; - let succ = self.write_place(output, succ, acc); - self.propagate_through_place_components(output, succ) - } - }); - - // Inputs are executed first. Propagate last because of rev order - self.propagate_through_exprs(inputs, succ) - } - hir::ExprKind::Lit(..) | hir::ExprKind::ConstBlock(..) | hir::ExprKind::Err @@ -1387,20 +1365,6 @@ fn check_expr<'tcx>(this: &mut Liveness<'_, 'tcx>, expr: &'tcx Expr<'tcx>) { } } - hir::ExprKind::LlvmInlineAsm(ref asm) => { - for input in asm.inputs_exprs { - this.visit_expr(input); - } - - // Output operands must be places - for (o, output) in iter::zip(&asm.inner.outputs, asm.outputs_exprs) { - if !o.is_indirect { - this.check_place(output); - } - this.visit_expr(output); - } - } - hir::ExprKind::Let(let_expr) => { this.check_unused_vars_in_pat(let_expr.pat, None, |_, _, _, _| {}); } diff --git a/compiler/rustc_passes/src/naked_functions.rs b/compiler/rustc_passes/src/naked_functions.rs index 07cb165d796..dd14dce4b5b 100644 --- a/compiler/rustc_passes/src/naked_functions.rs +++ b/compiler/rustc_passes/src/naked_functions.rs @@ -236,22 +236,6 @@ impl<'tcx> CheckInlineAssembly<'tcx> { self.check_inline_asm(expr.hir_id, asm, span); } - ExprKind::LlvmInlineAsm(..) => { - self.items.push((ItemKind::Asm, span)); - self.tcx.struct_span_lint_hir( - UNSUPPORTED_NAKED_FUNCTIONS, - expr.hir_id, - span, - |lint| { - lint.build( - "the LLVM-style inline assembly is unsupported in naked functions", - ) - .help("use the new asm! syntax specified in RFC 2873") - .emit(); - }, - ); - } - ExprKind::DropTemps(..) | ExprKind::Block(..) | ExprKind::Err => { hir::intravisit::walk_expr(self, expr); } |
