提交 79e5814f 编写于 作者: B bors

Auto merge of #83177 - erikdesjardins:zstassign, r=oli-obk

Remove assignments to ZST places instead of marking ZST return place as unused

partially reverts #83118

requested by `@tmiasko` in https://github.com/rust-lang/rust/pull/83118#issuecomment-799692574

r? `@oli-obk`
......@@ -44,6 +44,7 @@
pub mod remove_noop_landing_pads;
pub mod remove_storage_markers;
pub mod remove_unneeded_drops;
pub mod remove_zsts;
pub mod required_consts;
pub mod rustc_peek;
pub mod simplify;
......@@ -494,6 +495,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// The main optimizations that we do on MIR.
let optimizations: &[&dyn MirPass<'tcx>] = &[
&remove_storage_markers::RemoveStorageMarkers,
&remove_zsts::RemoveZsts,
&const_goto::ConstGoto,
&remove_unneeded_drops::RemoveUnneededDrops,
&match_branches::MatchBranchSimplification,
......
//! Removes assignments to ZST places.
use crate::transform::MirPass;
use rustc_middle::mir::{Body, StatementKind};
use rustc_middle::ty::{self, Ty, TyCtxt};
pub struct RemoveZsts;
impl<'tcx> MirPass<'tcx> for RemoveZsts {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
if tcx.sess.mir_opt_level() < 3 {
return;
}
let param_env = tcx.param_env(body.source.def_id());
let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
for block in basic_blocks.iter_mut() {
for statement in block.statements.iter_mut() {
match statement.kind {
StatementKind::Assign(box (place, _)) => {
let place_ty = place.ty(local_decls, tcx).ty;
if !maybe_zst(place_ty) {
continue;
}
let layout = match tcx.layout_of(param_env.and(place_ty)) {
Ok(layout) => layout,
Err(_) => continue,
};
if !layout.is_zst() {
continue;
}
if tcx.consider_optimizing(|| {
format!(
"RemoveZsts - Place: {:?} SourceInfo: {:?}",
place, statement.source_info
)
}) {
statement.make_nop();
}
}
_ => {}
}
}
}
}
}
/// A cheap, approximate check to avoid unnecessary `layout_of` calls.
fn maybe_zst(ty: Ty<'_>) -> bool {
match ty.kind() {
// maybe ZST (could be more precise)
ty::Adt(..) | ty::Array(..) | ty::Closure(..) | ty::Tuple(..) | ty::Opaque(..) => true,
// definitely ZST
ty::FnDef(..) | ty::Never => true,
// unreachable or can't be ZST
_ => false,
}
}
......@@ -31,10 +31,10 @@
use rustc_index::vec::{Idx, IndexVec};
use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Visitor};
use rustc_middle::mir::*;
use rustc_middle::ty::ParamEnv;
use rustc_middle::ty::TyCtxt;
use smallvec::SmallVec;
use std::{borrow::Cow, convert::TryInto};
use std::borrow::Cow;
use std::convert::TryInto;
pub struct SimplifyCfg {
label: String,
......@@ -326,7 +326,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
pub fn simplify_locals<'tcx>(body: &mut Body<'tcx>, tcx: TyCtxt<'tcx>) {
// First, we're going to get a count of *actual* uses for every `Local`.
let mut used_locals = UsedLocals::new(body, tcx);
let mut used_locals = UsedLocals::new(body);
// Next, we're going to remove any `Local` with zero actual uses. When we remove those
// `Locals`, we're also going to subtract any uses of other `Locals` from the `used_locals`
......@@ -336,8 +336,7 @@ pub fn simplify_locals<'tcx>(body: &mut Body<'tcx>, tcx: TyCtxt<'tcx>) {
remove_unused_definitions(&mut used_locals, body);
// Finally, we'll actually do the work of shrinking `body.local_decls` and remapping the `Local`s.
let arg_count = body.arg_count.try_into().unwrap();
let map = make_local_map(&mut body.local_decls, &used_locals, arg_count);
let map = make_local_map(&mut body.local_decls, &used_locals);
// Only bother running the `LocalUpdater` if we actually found locals to remove.
if map.iter().any(Option::is_none) {
......@@ -350,61 +349,54 @@ pub fn simplify_locals<'tcx>(body: &mut Body<'tcx>, tcx: TyCtxt<'tcx>) {
}
/// Construct the mapping while swapping out unused stuff out from the `vec`.
fn make_local_map<'tcx, V>(
fn make_local_map<V>(
local_decls: &mut IndexVec<Local, V>,
used_locals: &UsedLocals<'tcx>,
arg_count: u32,
used_locals: &UsedLocals,
) -> IndexVec<Local, Option<Local>> {
let mut map: IndexVec<Local, Option<Local>> = IndexVec::from_elem(None, local_decls);
let mut map: IndexVec<Local, Option<Local>> = IndexVec::from_elem(None, &*local_decls);
let mut used = Local::new(0);
for alive_index in local_decls.indices() {
// When creating the local map treat the `RETURN_PLACE` and arguments as used.
if alive_index.as_u32() <= arg_count || used_locals.is_used(alive_index) {
map[alive_index] = Some(used);
if alive_index != used {
local_decls.swap(alive_index, used);
}
used.increment_by(1);
// `is_used` treats the `RETURN_PLACE` and arguments as used.
if !used_locals.is_used(alive_index) {
continue;
}
map[alive_index] = Some(used);
if alive_index != used {
local_decls.swap(alive_index, used);
}
used.increment_by(1);
}
local_decls.truncate(used.index());
map
}
/// Keeps track of used & unused locals.
struct UsedLocals<'tcx> {
struct UsedLocals {
increment: bool,
arg_count: u32,
use_count: IndexVec<Local, u32>,
is_static: bool,
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
param_env: ParamEnv<'tcx>,
tcx: TyCtxt<'tcx>,
}
impl UsedLocals<'tcx> {
impl UsedLocals {
/// Determines which locals are used & unused in the given body.
fn new(body: &Body<'tcx>, tcx: TyCtxt<'tcx>) -> Self {
let def_id = body.source.def_id();
let is_static = tcx.is_static(def_id);
let param_env = tcx.param_env(def_id);
let local_decls = body.local_decls.clone();
fn new(body: &Body<'_>) -> Self {
let mut this = Self {
increment: true,
arg_count: body.arg_count.try_into().unwrap(),
use_count: IndexVec::from_elem(0, &body.local_decls),
is_static,
local_decls,
param_env,
tcx,
};
this.visit_body(body);
this
}
/// Checks if local is used.
///
/// Return place and arguments are always considered used.
fn is_used(&self, local: Local) -> bool {
trace!("is_used({:?}): use_count: {:?}", local, self.use_count[local]);
self.use_count[local] != 0
local.as_u32() <= self.arg_count || self.use_count[local] != 0
}
/// Updates the use counts to reflect the removal of given statement.
......@@ -434,7 +426,7 @@ fn visit_lhs(&mut self, place: &Place<'tcx>, location: Location) {
}
}
impl Visitor<'tcx> for UsedLocals<'tcx> {
impl Visitor<'_> for UsedLocals {
fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
match statement.kind {
StatementKind::LlvmInlineAsm(..)
......@@ -461,21 +453,7 @@ fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
}
}
fn visit_local(&mut self, local: &Local, ctx: PlaceContext, _location: Location) {
debug!("local: {:?} is_static: {:?}, ctx: {:?}", local, self.is_static, ctx);
// Do not count _0 as a used in `return;` if it is a ZST.
let return_place = *local == RETURN_PLACE
&& matches!(ctx, PlaceContext::NonMutatingUse(visit::NonMutatingUseContext::Move));
if !self.is_static && return_place {
let ty = self.local_decls[*local].ty;
let param_env_and = self.param_env.and(ty);
if let Ok(layout) = self.tcx.layout_of(param_env_and) {
debug!("layout.is_zst: {:?}", layout.is_zst());
if layout.is_zst() {
return;
}
}
}
fn visit_local(&mut self, local: &Local, _ctx: PlaceContext, _location: Location) {
if self.increment {
self.use_count[*local] += 1;
} else {
......@@ -486,10 +464,7 @@ fn visit_local(&mut self, local: &Local, ctx: PlaceContext, _location: Location)
}
/// Removes unused definitions. Updates the used locals to reflect the changes made.
fn remove_unused_definitions<'a, 'tcx>(
used_locals: &'a mut UsedLocals<'tcx>,
body: &mut Body<'tcx>,
) {
fn remove_unused_definitions<'a, 'tcx>(used_locals: &'a mut UsedLocals, body: &mut Body<'tcx>) {
// The use counts are updated as we remove the statements. A local might become unused
// during the retain operation, leading to a temporary inconsistency (storage statements or
// definitions referencing the local might remain). For correctness it is crucial that this
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
_0 = const (); // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
nop; // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2
}
}
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
_0 = const (); // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
nop; // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2
}
}
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
nop; // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
}
}
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
nop; // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
}
}
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
nop; // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
}
}
......
......@@ -18,7 +18,7 @@ fn main() -> () {
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
nop; // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
}
}
......
......@@ -99,7 +99,6 @@
_13 = const 64_u32; // scope 8 at $DIR/const_debuginfo.rs:21:13: 21:22
StorageDead(_15); // scope 8 at $DIR/const_debuginfo.rs:21:21: 21:22
StorageDead(_14); // scope 8 at $DIR/const_debuginfo.rs:21:21: 21:22
_0 = const (); // scope 0 at $DIR/const_debuginfo.rs:8:11: 22:2
StorageDead(_13); // scope 8 at $DIR/const_debuginfo.rs:22:1: 22:2
StorageDead(_12); // scope 7 at $DIR/const_debuginfo.rs:22:1: 22:2
StorageDead(_11); // scope 6 at $DIR/const_debuginfo.rs:22:1: 22:2
......
......@@ -23,7 +23,7 @@
+ _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:28
StorageDead(_2); // scope 0 at $DIR/aggregate.rs:5:27: 5:28
StorageDead(_3); // scope 0 at $DIR/aggregate.rs:5:28: 5:29
_0 = const (); // scope 0 at $DIR/aggregate.rs:4:11: 6:2
nop; // scope 0 at $DIR/aggregate.rs:4:11: 6:2
StorageDead(_1); // scope 0 at $DIR/aggregate.rs:6:1: 6:2
return; // scope 0 at $DIR/aggregate.rs:6:2: 6:2
}
......
......@@ -30,7 +30,7 @@
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2
nop; // scope 0 at $DIR/array_index.rs:4:11: 6:2
StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2
return; // scope 0 at $DIR/array_index.rs:6:2: 6:2
}
......
......@@ -30,7 +30,7 @@
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2
nop; // scope 0 at $DIR/array_index.rs:4:11: 6:2
StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2
return; // scope 0 at $DIR/array_index.rs:6:2: 6:2
}
......
......@@ -45,7 +45,7 @@
- _2 = Div(const 1_i32, move _3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _2 = Div(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
StorageDead(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
_0 = const (); // scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 6:2
nop; // scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 6:2
StorageDead(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:6:1: 6:2
StorageDead(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:6:1: 6:2
return; // scope 0 at $DIR/bad_op_div_by_zero.rs:6:2: 6:2
......
......@@ -45,7 +45,7 @@
- _2 = Rem(const 1_i32, move _3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
StorageDead(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
_0 = const (); // scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 6:2
nop; // scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 6:2
StorageDead(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:6:1: 6:2
StorageDead(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:6:1: 6:2
return; // scope 0 at $DIR/bad_op_mod_by_zero.rs:6:2: 6:2
......
......@@ -50,7 +50,7 @@
bb1: {
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:25: 7:26
_0 = const (); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:8:5: 8:6
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:1: 9:2
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:2: 9:2
......
......@@ -50,7 +50,7 @@
bb1: {
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:25: 7:26
_0 = const (); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:8:5: 8:6
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:1: 9:2
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:2: 9:2
......
......@@ -28,7 +28,7 @@
bb1: {
StorageDead(_3); // scope 0 at $DIR/boxes.rs:12:26: 12:27
_0 = const (); // scope 0 at $DIR/boxes.rs:11:11: 13:2
nop; // scope 0 at $DIR/boxes.rs:11:11: 13:2
StorageDead(_1); // scope 0 at $DIR/boxes.rs:13:1: 13:2
return; // scope 0 at $DIR/boxes.rs:13:2: 13:2
}
......
......@@ -19,7 +19,7 @@
StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10
- _2 = const 42_u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:6:13: 6:24
+ _2 = const 42_u8; // scope 1 at $DIR/cast.rs:6:13: 6:24
_0 = const (); // scope 0 at $DIR/cast.rs:3:11: 7:2
nop; // scope 0 at $DIR/cast.rs:3:11: 7:2
StorageDead(_2); // scope 1 at $DIR/cast.rs:7:1: 7:2
StorageDead(_1); // scope 0 at $DIR/cast.rs:7:1: 7:2
return; // scope 0 at $DIR/cast.rs:7:2: 7:2
......
......@@ -23,7 +23,7 @@
bb1: {
- _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ _1 = const 2_u32; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
_0 = const (); // scope 0 at $DIR/checked_add.rs:4:11: 6:2
nop; // scope 0 at $DIR/checked_add.rs:4:11: 6:2
StorageDead(_1); // scope 0 at $DIR/checked_add.rs:6:1: 6:2
return; // scope 0 at $DIR/checked_add.rs:6:2: 6:2
}
......
......@@ -39,7 +39,7 @@
bb1: {
StorageDead(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12
StorageDead(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13
_0 = const (); // scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
nop; // scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
StorageDead(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2
return; // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2
}
......
......@@ -4,6 +4,7 @@ fn hello() -> () {
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
bb0: {
_0 = const (); // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
}
}
......@@ -41,7 +41,7 @@
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
_0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2
nop; // scope 0 at $DIR/discriminant.rs:10:11: 12:2
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:12:1: 12:2
return; // scope 0 at $DIR/discriminant.rs:12:2: 12:2
}
......
......@@ -41,7 +41,7 @@
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
_0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2
nop; // scope 0 at $DIR/discriminant.rs:10:11: 12:2
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:12:1: 12:2
return; // scope 0 at $DIR/discriminant.rs:12:2: 12:2
}
......
......@@ -28,7 +28,7 @@
- _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ _1 = const 3_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:29
StorageDead(_2); // scope 0 at $DIR/indirect.rs:5:28: 5:29
_0 = const (); // scope 0 at $DIR/indirect.rs:4:11: 6:2
nop; // scope 0 at $DIR/indirect.rs:4:11: 6:2
StorageDead(_1); // scope 0 at $DIR/indirect.rs:6:1: 6:2
return; // scope 0 at $DIR/indirect.rs:6:2: 6:2
}
......
......@@ -11,8 +11,7 @@
StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
- (_2.0: ()) = move _3; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
+ (_2.0: ()) = const (); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
nop; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
StorageDead(_3); // scope 0 at $DIR/issue-66971.rs:16:21: 16:22
......@@ -25,7 +24,7 @@
bb1: {
StorageDead(_2); // scope 0 at $DIR/issue-66971.rs:16:22: 16:23
StorageDead(_1); // scope 0 at $DIR/issue-66971.rs:16:23: 16:24
_0 = const (); // scope 0 at $DIR/issue-66971.rs:15:11: 17:2
nop; // scope 0 at $DIR/issue-66971.rs:15:11: 17:2
return; // scope 0 at $DIR/issue-66971.rs:17:2: 17:2
}
}
......
......@@ -28,7 +28,7 @@
bb1: {
StorageDead(_2); // scope 0 at $DIR/issue-67019.rs:11:19: 11:20
StorageDead(_1); // scope 0 at $DIR/issue-67019.rs:11:20: 11:21
_0 = const (); // scope 0 at $DIR/issue-67019.rs:10:11: 12:2
nop; // scope 0 at $DIR/issue-67019.rs:10:11: 12:2
return; // scope 0 at $DIR/issue-67019.rs:12:2: 12:2
}
}
......
......@@ -29,7 +29,7 @@
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
_0 = const (); // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
nop; // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:7:1: 7:2
return; // scope 0 at $DIR/large_array_index.rs:7:2: 7:2
}
......
......@@ -29,7 +29,7 @@
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
_0 = const (); // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
nop; // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:7:1: 7:2
return; // scope 0 at $DIR/large_array_index.rs:7:2: 7:2
}
......
......@@ -19,7 +19,7 @@
StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:7:9: 7:10
- _2 = _1; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
_0 = const (); // scope 0 at $DIR/mutable_variable.rs:4:11: 8:2
nop; // scope 0 at $DIR/mutable_variable.rs:4:11: 8:2
StorageDead(_2); // scope 1 at $DIR/mutable_variable.rs:8:1: 8:2
StorageDead(_1); // scope 0 at $DIR/mutable_variable.rs:8:1: 8:2
return; // scope 0 at $DIR/mutable_variable.rs:8:2: 8:2
......
......@@ -23,7 +23,7 @@
+ // mir::Constant
+ // + span: $DIR/mutable_variable_aggregate.rs:7:13: 7:14
+ // + literal: Const { ty: (i32, i32), val: Value(ByRef { alloc: Allocation { bytes: [42, 0, 0, 0, 99, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 8:2
nop; // scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 8:2
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:8:1: 8:2
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:8:1: 8:2
return; // scope 0 at $DIR/mutable_variable_aggregate.rs:8:2: 8:2
......
......@@ -25,7 +25,7 @@
((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:7:5: 7:13
StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10
_3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:13: 8:14
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 9:2
nop; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 9:2
StorageDead(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
......
......@@ -26,7 +26,7 @@
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10
- _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 9:2
nop; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 9:2
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:9:1: 9:2
return; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:9:2: 9:2
......
......@@ -34,11 +34,11 @@
_1 = move _3; // scope 2 at $DIR/mutable_variable_no_prop.rs:9:9: 9:19
StorageDead(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:18: 9:19
StorageDead(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:19: 9:20
_2 = const (); // scope 2 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
nop; // scope 2 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
StorageDead(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:10:5: 10:6
StorageLive(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:11:9: 11:10
_5 = _1; // scope 1 at $DIR/mutable_variable_no_prop.rs:11:13: 11:14
_0 = const (); // scope 0 at $DIR/mutable_variable_no_prop.rs:6:11: 12:2
nop; // scope 0 at $DIR/mutable_variable_no_prop.rs:6:11: 12:2
StorageDead(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:12:1: 12:2
StorageDead(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:12:1: 12:2
return; // scope 0 at $DIR/mutable_variable_no_prop.rs:12:2: 12:2
......
......@@ -41,7 +41,7 @@
_4 = (_2.1: i32); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:8:13: 8:16
StorageLive(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:9:9: 9:10
_5 = (_2.0: i32); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:9:13: 9:16
_0 = const (); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:4:11: 10:2
nop; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:4:11: 10:2
StorageDead(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
StorageDead(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
StorageDead(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
......
......@@ -60,7 +60,7 @@
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
nop; // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
......
......@@ -60,7 +60,7 @@
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
nop; // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
......
......@@ -42,7 +42,7 @@
StorageDead(_2); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22
StorageDead(_5); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23
StorageDead(_3); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23
_0 = const (); // scope 0 at $DIR/read_immutable_static.rs:6:11: 8:2
nop; // scope 0 at $DIR/read_immutable_static.rs:6:11: 8:2
StorageDead(_1); // scope 0 at $DIR/read_immutable_static.rs:8:1: 8:2
return; // scope 0 at $DIR/read_immutable_static.rs:8:2: 8:2
}
......
......@@ -23,7 +23,7 @@
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
_0 = const (); // scope 0 at $DIR/ref_deref.rs:4:11: 6:2
nop; // scope 0 at $DIR/ref_deref.rs:4:11: 6:2
return; // scope 0 at $DIR/ref_deref.rs:6:2: 6:2
}
}
......
......@@ -22,7 +22,7 @@
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
_0 = const (); // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2
nop; // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2
return; // scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2
}
}
......
......@@ -22,7 +22,7 @@
_1 = move _2 as *const fn() (Misc); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
StorageDead(_2); // scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41
StorageDead(_1); // scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42
_0 = const (); // scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2
nop; // scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2
return; // scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2
}
}
......
......@@ -35,7 +35,7 @@
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
_0 = const (); // scope 0 at $DIR/repeat.rs:5:11: 7:2
nop; // scope 0 at $DIR/repeat.rs:5:11: 7:2
StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2
return; // scope 0 at $DIR/repeat.rs:7:2: 7:2
}
......
......@@ -35,7 +35,7 @@
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
_0 = const (); // scope 0 at $DIR/repeat.rs:5:11: 7:2
nop; // scope 0 at $DIR/repeat.rs:5:11: 7:2
StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2
return; // scope 0 at $DIR/repeat.rs:7:2: 7:2
}
......
......@@ -27,7 +27,7 @@
bb1: {
StorageDead(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:14: 4:15
StorageDead(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:15: 4:16
_0 = const (); // scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 5:2
nop; // scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 5:2
StorageDead(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:5:1: 5:2
return; // scope 0 at $DIR/scalar_literal_propagation.rs:5:2: 5:2
}
......
......@@ -46,7 +46,7 @@
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/slice_len.rs:4:11: 6:2
nop; // scope 0 at $DIR/slice_len.rs:4:11: 6:2
return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2
}
}
......
......@@ -46,7 +46,7 @@
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/slice_len.rs:4:11: 6:2
nop; // scope 0 at $DIR/slice_len.rs:4:11: 6:2
return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2
}
}
......
......@@ -30,7 +30,7 @@
bb1: {
StorageDead(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:14: 5:15
StorageDead(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:15: 5:16
_0 = const (); // scope 0 at $DIR/tuple_literal_propagation.rs:2:11: 6:2
nop; // scope 0 at $DIR/tuple_literal_propagation.rs:2:11: 6:2
StorageDead(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:6:1: 6:2
return; // scope 0 at $DIR/tuple_literal_propagation.rs:6:2: 6:2
}
......
......@@ -25,14 +25,14 @@
_3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
(*_3) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:14:9: 14:26
StorageDead(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:26: 14:27
_2 = const (); // scope 2 at $DIR/const_prop_miscompile.rs:13:5: 15:6
nop; // scope 2 at $DIR/const_prop_miscompile.rs:13:5: 15:6
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:15:5: 15:6
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:16:9: 16:10
StorageLive(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:20
_5 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:15: 16:18
_4 = Eq(move _5, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:25
StorageDead(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:24: 16:25
_0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:11:10: 17:2
nop; // scope 0 at $DIR/const_prop_miscompile.rs:11:10: 17:2
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:17:1: 17:2
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:17:1: 17:2
return; // scope 0 at $DIR/const_prop_miscompile.rs:17:2: 17:2
......
......@@ -26,7 +26,7 @@
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:15: 7:18
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:25
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:24: 7:25
_0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:4:10: 8:2
nop; // scope 0 at $DIR/const_prop_miscompile.rs:4:10: 8:2
StorageDead(_3); // scope 1 at $DIR/const_prop_miscompile.rs:8:1: 8:2
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:8:1: 8:2
return; // scope 0 at $DIR/const_prop_miscompile.rs:8:2: 8:2
......
......@@ -62,7 +62,7 @@
bb6: {
StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6
_0 = const (); // scope 0 at $DIR/branch.rs:12:11: 21:2
nop; // scope 0 at $DIR/branch.rs:12:11: 21:2
- StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
- StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
+ nop; // scope 1 at $DIR/branch.rs:21:1: 21:2
......
......@@ -21,7 +21,7 @@
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14
_1 = const 5_u8; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2
nop; // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2
}
}
......
......@@ -15,7 +15,7 @@
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2
nop; // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:24:2: 24:2
}
}
......
......@@ -25,7 +25,7 @@
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
nop; // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2
}
}
......
......@@ -58,7 +58,6 @@
+ _6 = _4; // scope 3 at $DIR/cycle.rs:14:10: 14:11
StorageDead(_6); // scope 3 at $DIR/cycle.rs:14:11: 14:12
StorageDead(_5); // scope 3 at $DIR/cycle.rs:14:12: 14:13
_0 = const (); // scope 0 at $DIR/cycle.rs:8:11: 15:2
- StorageDead(_3); // scope 2 at $DIR/cycle.rs:15:1: 15:2
- StorageDead(_2); // scope 1 at $DIR/cycle.rs:15:1: 15:2
- StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:1: 15:2
......
......@@ -33,7 +33,6 @@
_4 = (_1.0: u32); // scope 2 at $DIR/union.rs:15:19: 15:24
StorageDead(_4); // scope 1 at $DIR/union.rs:15:26: 15:27
StorageDead(_3); // scope 1 at $DIR/union.rs:15:27: 15:28
_0 = const (); // scope 0 at $DIR/union.rs:8:11: 16:2
StorageDead(_1); // scope 0 at $DIR/union.rs:16:1: 16:2
return; // scope 0 at $DIR/union.rs:16:2: 16:2
}
......
......@@ -98,7 +98,7 @@
- bb2: {
+ StorageDead(_35); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:25: 27:27
StorageLive(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:25: 27:27
((_0 as Err).0: ()) = const (); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
discriminant(_0) = 1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
StorageDead(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:27: 27:28
- StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch_68867.rs:28:6: 28:7
......
......@@ -84,7 +84,7 @@
- bb2: {
+ StorageDead(_35); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:25: 27:27
StorageLive(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:25: 27:27
((_0 as Err).0: ()) = const (); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
discriminant(_0) = 1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:21: 27:28
StorageDead(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:27: 27:28
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch_68867.rs:28:6: 28:7
......
......@@ -28,7 +28,6 @@ fn main() -> () {
StorageLive(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_5 = move (_3.0: ()); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageLive(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_6 = const (); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_6); // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageDead(_4); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10
......
......@@ -58,7 +58,7 @@
}
bb1: {
_0 = const (); // scope 0 at $DIR/issue-73223.rs:4:17: 4:23
nop; // scope 0 at $DIR/issue-73223.rs:4:17: 4:23
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
......@@ -146,13 +146,13 @@
}
bb4: {
_8 = const (); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
nop; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_14); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_13); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
nop; // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
StorageDead(_6); // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
......
......@@ -58,7 +58,7 @@
}
bb1: {
_0 = const (); // scope 0 at $DIR/issue-73223.rs:4:17: 4:23
nop; // scope 0 at $DIR/issue-73223.rs:4:17: 4:23
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
......@@ -146,13 +146,13 @@
}
bb4: {
_8 = const (); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
nop; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_14); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_13); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
nop; // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
StorageDead(_6); // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
......
......@@ -107,7 +107,7 @@
StorageDead(_14); // scope 1 at $DIR/issue_76432.rs:9:84: 9:85
StorageDead(_13); // scope 1 at $DIR/issue_76432.rs:9:84: 9:85
StorageDead(_9); // scope 1 at $DIR/issue_76432.rs:11:6: 11:7
_0 = const (); // scope 0 at $DIR/issue_76432.rs:6:44: 12:2
nop; // scope 0 at $DIR/issue_76432.rs:6:44: 12:2
StorageDead(_5); // scope 0 at $DIR/issue_76432.rs:12:1: 12:2
StorageDead(_2); // scope 0 at $DIR/issue_76432.rs:12:1: 12:2
return; // scope 0 at $DIR/issue_76432.rs:12:2: 12:2
......
......@@ -13,7 +13,7 @@
- }
-
- bb1: {
- goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- }
-
- bb2: {
......
......@@ -13,7 +13,7 @@
- }
-
- bb1: {
- goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- }
-
- bb2: {
......
......@@ -4,24 +4,8 @@
fn test(_1: bool) -> () {
debug x => _1; // in scope 0 at $DIR/multiple_return_terminators.rs:4:9: 4:10
let mut _0: (); // return place in scope 0 at $DIR/multiple_return_terminators.rs:4:18: 4:18
let mut _2: bool; // in scope 0 at $DIR/multiple_return_terminators.rs:5:8: 5:9
bb0: {
StorageLive(_2); // scope 0 at $DIR/multiple_return_terminators.rs:5:8: 5:9
_2 = _1; // scope 0 at $DIR/multiple_return_terminators.rs:5:8: 5:9
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/multiple_return_terminators.rs:5:5: 9:6
}
bb1: {
goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:5:5: 9:6
}
bb2: {
goto -> bb3; // scope 0 at $DIR/multiple_return_terminators.rs:5:5: 9:6
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/multiple_return_terminators.rs:9:5: 9:6
return; // scope 0 at $DIR/multiple_return_terminators.rs:10:2: 10:2
}
}
......
......@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
nop; // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
}
......@@ -24,7 +25,7 @@
bb2: {
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:21:11: 21:12
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:21:12: 21:13
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:20:32: 22:2
nop; // scope 0 at $DIR/remove_unneeded_drops.rs:20:32: 22:2
return; // scope 0 at $DIR/remove_unneeded_drops.rs:22:2: 22:2
}
}
......
......@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
nop; // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
}
......@@ -24,7 +25,7 @@
bb2: {
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:9:11: 9:12
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:9:12: 9:13
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:8:27: 10:2
nop; // scope 0 at $DIR/remove_unneeded_drops.rs:8:27: 10:2
return; // scope 0 at $DIR/remove_unneeded_drops.rs:10:2: 10:2
}
}
......
......@@ -14,13 +14,14 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
- nop; // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
- drop(_3) -> bb1; // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
- }
-
- bb1: {
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:4:11: 4:12
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:4:12: 4:13
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:3:17: 5:2
- nop; // scope 0 at $DIR/remove_unneeded_drops.rs:3:17: 5:2
return; // scope 0 at $DIR/remove_unneeded_drops.rs:5:2: 5:2
}
}
......
......@@ -14,13 +14,14 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
- nop; // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
- drop(_3) -> bb1; // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
- }
-
- bb1: {
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:14:11: 14:12
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:14:12: 14:13
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:13:36: 15:2
- nop; // scope 0 at $DIR/remove_unneeded_drops.rs:13:36: 15:2
return; // scope 0 at $DIR/remove_unneeded_drops.rs:15:2: 15:2
}
}
......
......@@ -50,7 +50,7 @@
bb4: {
StorageDead(_2); // scope 1 at $DIR/simplify-arm-identity.rs:22:6: 22:7
_0 = const (); // scope 0 at $DIR/simplify-arm-identity.rs:17:11: 23:2
nop; // scope 0 at $DIR/simplify-arm-identity.rs:17:11: 23:2
StorageDead(_1); // scope 0 at $DIR/simplify-arm-identity.rs:23:1: 23:2
return; // scope 0 at $DIR/simplify-arm-identity.rs:23:2: 23:2
}
......
......@@ -50,7 +50,7 @@
bb4: {
StorageDead(_2); // scope 1 at $DIR/simplify-arm-identity.rs:22:6: 22:7
_0 = const (); // scope 0 at $DIR/simplify-arm-identity.rs:17:11: 23:2
nop; // scope 0 at $DIR/simplify-arm-identity.rs:17:11: 23:2
StorageDead(_1); // scope 0 at $DIR/simplify-arm-identity.rs:23:1: 23:2
return; // scope 0 at $DIR/simplify-arm-identity.rs:23:2: 23:2
}
......
......@@ -22,13 +22,13 @@
}
bb2: {
_0 = const (); // scope 0 at $DIR/simplify_if.rs:8:6: 8:6
nop; // scope 0 at $DIR/simplify_if.rs:8:6: 8:6
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/simplify_if.rs:7:15: 7:16
_0 = const (); // scope 0 at $DIR/simplify_if.rs:6:14: 8:6
nop; // scope 0 at $DIR/simplify_if.rs:6:14: 8:6
goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
}
......
......@@ -25,7 +25,6 @@
- StorageDead(_3); // scope 1 at $DIR/simplify-locals.rs:16:25: 16:26
- StorageDead(_4); // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
- StorageDead(_2); // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:13:8: 17:2
StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:17:1: 17:2
return; // scope 0 at $DIR/simplify-locals.rs:17:2: 17:2
}
......
......@@ -11,7 +11,6 @@
- StorageLive(_1); // scope 0 at $DIR/simplify-locals.rs:22:13: 22:17
- discriminant(_1) = 0; // scope 0 at $DIR/simplify-locals.rs:22:13: 22:17
- StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:22:17: 22:18
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:20:9: 23:2
return; // scope 0 at $DIR/simplify-locals.rs:23:2: 23:2
}
}
......
......@@ -31,7 +31,6 @@
- // + literal: Const { ty: E, val: Value(Scalar(0x01)) }
- StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:28:25: 28:26
- StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:28:26: 28:27
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:26:9: 29:2
return; // scope 0 at $DIR/simplify-locals.rs:29:2: 29:2
}
}
......
......@@ -23,7 +23,6 @@
- StorageLive(_3); // scope 2 at $DIR/simplify-locals.rs:36:13: 36:19
- _3 = &mut _1; // scope 2 at $DIR/simplify-locals.rs:36:13: 36:19
- StorageDead(_3); // scope 2 at $DIR/simplify-locals.rs:36:19: 36:20
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:32:8: 37:2
StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:37:1: 37:2
return; // scope 0 at $DIR/simplify-locals.rs:37:2: 37:2
}
......
......@@ -15,7 +15,6 @@
- _1 = (*_2); // scope 1 at $DIR/simplify-locals.rs:44:14: 44:15
- StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:44:17: 44:18
- StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:44:17: 44:18
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:42:9: 45:2
return; // scope 0 at $DIR/simplify-locals.rs:45:2: 45:2
}
}
......
......@@ -15,7 +15,6 @@
- _1 = &mut (*_2); // scope 1 at $DIR/simplify-locals.rs:50:14: 50:20
- StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:50:22: 50:23
- StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:50:22: 50:23
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:48:9: 51:2
return; // scope 0 at $DIR/simplify-locals.rs:51:2: 51:2
}
}
......
......@@ -19,7 +19,6 @@
- StorageDead(_3); // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
- StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
- StorageDead(_1); // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
- _0 = const (); // scope 0 at $DIR/simplify-locals.rs:54:9: 57:2
return; // scope 0 at $DIR/simplify-locals.rs:57:2: 57:2
}
}
......
......@@ -30,7 +30,7 @@
}
bb1: {
- _0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:6: 8:6
_0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:6: 8:6
goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6
}
......@@ -51,12 +51,12 @@
}
bb4: {
- _0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
_0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
goto -> bb6; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
}
bb5: {
- _0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
_0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
goto -> bb6; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
}
......
......@@ -23,8 +23,6 @@
- StorageLive(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
- StorageLive(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
- StorageLive(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
- (_1.0: ()) = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
- (_1.1: ()) = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
- StorageDead(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
- StorageDead(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
- StorageDead(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29
......@@ -32,8 +30,6 @@
- StorageLive(_5); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
- StorageLive(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
- StorageLive(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
- (_5.0: ()) = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
- (_5.1: ()) = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
- StorageDead(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
- StorageDead(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
- _4 = use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
......@@ -71,7 +67,6 @@
- StorageDead(_9); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:34: 16:35
- StorageDead(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
- StorageDead(_8); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
- _0 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
+ StorageDead(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
return; // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
}
......
......@@ -21,7 +21,7 @@
}
bb1: {
_0 = const (); // scope 0 at $DIR/simplify_match.rs:8:18: 8:20
nop; // scope 0 at $DIR/simplify_match.rs:8:18: 8:20
goto -> bb3; // scope 0 at $DIR/simplify_match.rs:6:5: 9:6
}
......
......@@ -20,7 +20,6 @@ fn main() -> () {
_3 = &/*tls*/ mut FOO; // scope 2 at $DIR/tls-access.rs:9:9: 9:12
(*_3) = const 42_u8; // scope 2 at $DIR/tls-access.rs:9:9: 9:17
StorageDead(_3); // scope 2 at $DIR/tls-access.rs:9:17: 9:18
_0 = const (); // scope 1 at $DIR/tls-access.rs:7:5: 10:6
StorageDead(_2); // scope 1 at $DIR/tls-access.rs:10:5: 10:6
StorageDead(_1); // scope 1 at $DIR/tls-access.rs:10:5: 10:6
return; // scope 0 at $DIR/tls-access.rs:11:2: 11:2
......
......@@ -25,7 +25,7 @@
}
bb1: {
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
nop; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
}
......@@ -35,7 +35,7 @@
bb3: {
_1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
nop; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
}
......
......@@ -25,7 +25,7 @@
}
bb1: {
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
nop; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
}
......@@ -35,7 +35,7 @@
bb3: {
_1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15
_0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
nop; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
}
......
......@@ -20,40 +20,36 @@ fn while_loop(_1: bool) -> () {
bb1: {
StorageDead(_3); // scope 0 at $DIR/while-storage.rs:10:21: 10:22
switchInt(_2) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/while-storage.rs:10:5: 14:6
switchInt(_2) -> [false: bb6, otherwise: bb2]; // scope 0 at $DIR/while-storage.rs:10:5: 14:6
}
bb2: {
goto -> bb7; // scope 0 at $DIR/while-storage.rs:10:5: 14:6
}
bb3: {
StorageLive(_4); // scope 0 at $DIR/while-storage.rs:11:12: 11:23
StorageLive(_5); // scope 0 at $DIR/while-storage.rs:11:21: 11:22
_5 = _1; // scope 0 at $DIR/while-storage.rs:11:21: 11:22
_4 = get_bool(move _5) -> bb4; // scope 0 at $DIR/while-storage.rs:11:12: 11:23
_4 = get_bool(move _5) -> bb3; // scope 0 at $DIR/while-storage.rs:11:12: 11:23
// mir::Constant
// + span: $DIR/while-storage.rs:11:12: 11:20
// + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) }
}
bb4: {
bb3: {
StorageDead(_5); // scope 0 at $DIR/while-storage.rs:11:22: 11:23
switchInt(move _4) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/while-storage.rs:11:9: 13:10
switchInt(move _4) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/while-storage.rs:11:9: 13:10
}
bb5: {
bb4: {
StorageDead(_4); // scope 0 at $DIR/while-storage.rs:13:9: 13:10
goto -> bb7; // scope 0 at $DIR/while-storage.rs:1:1: 1:1
goto -> bb6; // scope 0 at $DIR/while-storage.rs:1:1: 1:1
}
bb6: {
bb5: {
StorageDead(_4); // scope 0 at $DIR/while-storage.rs:13:9: 13:10
StorageDead(_2); // scope 0 at $DIR/while-storage.rs:14:5: 14:6
goto -> bb0; // scope 0 at $DIR/while-storage.rs:10:5: 14:6
}
bb7: {
bb6: {
StorageDead(_2); // scope 0 at $DIR/while-storage.rs:14:5: 14:6
return; // scope 0 at $DIR/while-storage.rs:15:2: 15:2
}
......
......@@ -12,6 +12,7 @@ fn main() -> () {
}
bb1: {
_0 = const (); // scope 0 at main.rs:8:11: 10:2
return; // scope 0 at main.rs:10:2: 10:2
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册