Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieu

Remove deprecated LLVM-style inline assembly

The `llvm_asm!` was deprecated back in #87590 1.56.0, with intention to remove
it once `asm!` was stabilized, which already happened in #91728 1.59.0. Now it
is time to remove `llvm_asm!` to avoid continued maintenance cost.

Closes #70173.
Closes #92794.
Closes #87612.
Closes #82065.

cc `@rust-lang/wg-inline-asm`

r? `@Amanieu`
This commit is contained in:
bors
2022-01-17 09:40:29 +00:00
171 changed files with 235 additions and 3297 deletions

View File

@@ -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, |_, _, _, _| {});
}