From cc0b718aaa35bfb2a9ca5dd59078ae7e54dbc4bb Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Thu, 15 Oct 2020 08:40:40 -0500 Subject: Mark inout asm! operands as used in liveness pass --- compiler/rustc_passes/src/liveness.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_passes/src') diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index ae810b9e79a..7288015e170 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -1174,7 +1174,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { } } hir::InlineAsmOperand::InOut { expr, .. } => { - succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE); + succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE | ACC_USE); } hir::InlineAsmOperand::SplitInOut { out_expr, .. } => { if let Some(expr) = out_expr { -- cgit 1.4.1-3-g733a5 From fd193f2d7f7ebed086de9977951cac76211533b0 Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Sat, 17 Oct 2020 16:36:58 -0500 Subject: Treat InOut variables like other input variables --- compiler/rustc_passes/src/liveness.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_passes/src') diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index 7288015e170..e88b6cb11e5 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -1174,7 +1174,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { } } hir::InlineAsmOperand::InOut { expr, .. } => { - succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE | ACC_USE); + succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE); } hir::InlineAsmOperand::SplitInOut { out_expr, .. } => { if let Some(expr) = out_expr { @@ -1199,7 +1199,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { } } hir::InlineAsmOperand::InOut { expr, .. } => { - succ = self.propagate_through_place_components(expr, succ); + succ = self.propagate_through_expr(expr, succ); } hir::InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => { if let Some(expr) = out_expr { -- cgit 1.4.1-3-g733a5 From 17c6c5932c8de780fcd1d06aff230e8cc6bca9f8 Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Sun, 18 Oct 2020 23:51:10 -0500 Subject: Mark InOut operands as used in RWU table with write_place --- compiler/rustc_passes/src/liveness.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_passes/src') diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index e88b6cb11e5..7288015e170 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -1174,7 +1174,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { } } hir::InlineAsmOperand::InOut { expr, .. } => { - succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE); + succ = self.write_place(expr, succ, ACC_READ | ACC_WRITE | ACC_USE); } hir::InlineAsmOperand::SplitInOut { out_expr, .. } => { if let Some(expr) = out_expr { @@ -1199,7 +1199,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { } } hir::InlineAsmOperand::InOut { expr, .. } => { - succ = self.propagate_through_expr(expr, succ); + succ = self.propagate_through_place_components(expr, succ); } hir::InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => { if let Some(expr) = out_expr { -- cgit 1.4.1-3-g733a5