1
Fork 0

Revert "Implement references VarDebugInfo."

This reverts commit 2ec0071913.
This commit is contained in:
Camille GILLOT 2023-08-16 17:31:00 +00:00
parent bd138e2ae1
commit 933b618360
20 changed files with 183 additions and 248 deletions

View file

@ -42,9 +42,6 @@ pub struct PerLocalVarDebugInfo<'tcx, D> {
/// `.place.projection` from `mir::VarDebugInfo`. /// `.place.projection` from `mir::VarDebugInfo`.
pub projection: &'tcx ty::List<mir::PlaceElem<'tcx>>, pub projection: &'tcx ty::List<mir::PlaceElem<'tcx>>,
/// `references` from `mir::VarDebugInfo`.
pub references: u8,
} }
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
@ -323,7 +320,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
dbg_var, dbg_var,
fragment: None, fragment: None,
projection: ty::List::empty(), projection: ty::List::empty(),
references: 0,
}) })
} }
} else { } else {
@ -399,15 +395,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
&self, &self,
bx: &mut Bx, bx: &mut Bx,
local: mir::Local, local: mir::Local,
mut base: PlaceRef<'tcx, Bx::Value>, base: PlaceRef<'tcx, Bx::Value>,
var: PerLocalVarDebugInfo<'tcx, Bx::DIVariable>, var: PerLocalVarDebugInfo<'tcx, Bx::DIVariable>,
) { ) {
let Some(dbg_var) = var.dbg_var else { return }; let Some(dbg_var) = var.dbg_var else { return };
let Some(dbg_loc) = self.dbg_loc(var.source_info) else { return }; let Some(dbg_loc) = self.dbg_loc(var.source_info) else { return };
let DebugInfoOffset { mut direct_offset, indirect_offsets, result: _ } = let DebugInfoOffset { direct_offset, indirect_offsets, result: _ } =
calculate_debuginfo_offset(bx, local, &var, base.layout); calculate_debuginfo_offset(bx, local, &var, base.layout);
let mut indirect_offsets = &indirect_offsets[..];
// When targeting MSVC, create extra allocas for arguments instead of pointing multiple // When targeting MSVC, create extra allocas for arguments instead of pointing multiple
// dbg_var_addr() calls into the same alloca with offsets. MSVC uses CodeView records // dbg_var_addr() calls into the same alloca with offsets. MSVC uses CodeView records
@ -421,9 +416,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
// LLVM can handle simple things but anything more complex than just a direct // LLVM can handle simple things but anything more complex than just a direct
// offset or one indirect offset of 0 is too complex for it to generate CV records // offset or one indirect offset of 0 is too complex for it to generate CV records
// correctly. // correctly.
&& (direct_offset != Size::ZERO || !matches!(indirect_offsets, [Size::ZERO] | [])); && (direct_offset != Size::ZERO || !matches!(&indirect_offsets[..], [Size::ZERO] | []));
if should_create_individual_allocas {
let DebugInfoOffset { direct_offset: _, indirect_offsets: _, result: place } =
calculate_debuginfo_offset(bx, local, &var, base);
let create_alloca = |bx: &mut Bx, place: PlaceRef<'tcx, Bx::Value>, refcount| {
// Create a variable which will be a pointer to the actual value // Create a variable which will be a pointer to the actual value
let ptr_ty = Ty::new_ptr( let ptr_ty = Ty::new_ptr(
bx.tcx(), bx.tcx(),
@ -431,35 +429,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
); );
let ptr_layout = bx.layout_of(ptr_ty); let ptr_layout = bx.layout_of(ptr_ty);
let alloca = PlaceRef::alloca(bx, ptr_layout); let alloca = PlaceRef::alloca(bx, ptr_layout);
bx.set_var_name(alloca.llval, &format!("{}.ref{}.dbg.spill", var.name, refcount)); bx.set_var_name(alloca.llval, &(var.name.to_string() + ".dbg.spill"));
// Write the pointer to the variable // Write the pointer to the variable
bx.store(place.llval, alloca.llval, alloca.align); bx.store(place.llval, alloca.llval, alloca.align);
// Point the debug info to `*alloca` for the current variable // Point the debug info to `*alloca` for the current variable
alloca bx.dbg_var_addr(dbg_var, dbg_loc, alloca.llval, Size::ZERO, &[Size::ZERO], None);
}; } else {
bx.dbg_var_addr(dbg_var, dbg_loc, base.llval, direct_offset, &indirect_offsets, None);
if var.references > 0 {
base = calculate_debuginfo_offset(bx, local, &var, base).result;
// Point the debug info to `&...&base == alloca` for the current variable
for refcount in 0..var.references {
base = create_alloca(bx, base, refcount);
}
direct_offset = Size::ZERO;
indirect_offsets = &[];
} else if should_create_individual_allocas {
let place = calculate_debuginfo_offset(bx, local, &var, base).result;
// Point the debug info to `*alloca` for the current variable
base = create_alloca(bx, place, 0);
direct_offset = Size::ZERO;
indirect_offsets = &[Size::ZERO];
} }
bx.dbg_var_addr(dbg_var, dbg_loc, base.llval, direct_offset, indirect_offsets, None);
} }
pub fn debug_introduce_locals(&self, bx: &mut Bx) { pub fn debug_introduce_locals(&self, bx: &mut Bx) {
@ -492,7 +471,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
}; };
let dbg_var = dbg_scope_and_span.map(|(dbg_scope, _, span)| { let dbg_var = dbg_scope_and_span.map(|(dbg_scope, _, span)| {
let (mut var_ty, var_kind) = match var.value { let (var_ty, var_kind) = match var.value {
mir::VarDebugInfoContents::Place(place) => { mir::VarDebugInfoContents::Place(place) => {
let var_ty = self.monomorphized_place_ty(place.as_ref()); let var_ty = self.monomorphized_place_ty(place.as_ref());
let var_kind = if let Some(arg_index) = var.argument_index let var_kind = if let Some(arg_index) = var.argument_index
@ -529,13 +508,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
} }
}; };
for _ in 0..var.references {
var_ty = Ty::new_ptr(
bx.tcx(),
ty::TypeAndMut { mutbl: mir::Mutability::Mut, ty: var_ty },
);
}
self.cx.create_dbg_var(var.name, var_ty, dbg_scope, var_kind, span) self.cx.create_dbg_var(var.name, var_ty, dbg_scope, var_kind, span)
}); });
@ -547,7 +519,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
dbg_var, dbg_var,
fragment: None, fragment: None,
projection: place.projection, projection: place.projection,
references: var.references,
}); });
} }
mir::VarDebugInfoContents::Const(c) => { mir::VarDebugInfoContents::Const(c) => {
@ -601,7 +572,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
Some(fragment_start..fragment_start + fragment_layout.size) Some(fragment_start..fragment_start + fragment_layout.size)
}, },
projection: place.projection, projection: place.projection,
references: var.references,
}); });
} }
} }

View file

@ -701,12 +701,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
VarDebugInfoContents::Const(_) => {} VarDebugInfoContents::Const(_) => {}
VarDebugInfoContents::Place(place) => { VarDebugInfoContents::Place(place) => {
check_place(self, place); check_place(self, place);
if debuginfo.references != 0 && place.projection.last() == Some(&PlaceElem::Deref) {
self.fail(
START_BLOCK.start_location(),
format!("debuginfo {debuginfo:?}, has both ref and deref"),
);
}
} }
VarDebugInfoContents::Composite { ty, ref fragments } => { VarDebugInfoContents::Composite { ty, ref fragments } => {
for f in fragments { for f in fragments {

View file

@ -1109,10 +1109,6 @@ pub struct VarDebugInfo<'tcx> {
/// originated from (starting from 1). Note, if MIR inlining is enabled, then this is the /// originated from (starting from 1). Note, if MIR inlining is enabled, then this is the
/// argument number in the original function before it was inlined. /// argument number in the original function before it was inlined.
pub argument_index: Option<u16>, pub argument_index: Option<u16>,
/// The data represents `name` dereferenced `references` times,
/// and not the direct value.
pub references: u8,
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View file

@ -555,13 +555,8 @@ fn write_scope_tree(
} }
let indented_debug_info = format!( let indented_debug_info = format!(
"{0:1$}debug {2} => {3:&<4$}{5:?};", "{0:1$}debug {2} => {3:?};",
INDENT, INDENT, indent, var_debug_info.name, var_debug_info.value,
indent,
var_debug_info.name,
"",
var_debug_info.references as usize,
var_debug_info.value,
); );
if tcx.sess.opts.unstable_opts.mir_include_spans { if tcx.sess.opts.unstable_opts.mir_include_spans {

View file

@ -840,7 +840,6 @@ macro_rules! make_mir_visitor {
source_info, source_info,
value, value,
argument_index: _, argument_index: _,
references: _,
} = var_debug_info; } = var_debug_info;
self.visit_source_info(source_info); self.visit_source_info(source_info);

View file

@ -438,7 +438,6 @@ CloneLiftImpls! {
(), (),
bool, bool,
usize, usize,
u8,
u16, u16,
u32, u32,
u64, u64,

View file

@ -2242,7 +2242,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
self.var_debug_info.push(VarDebugInfo { self.var_debug_info.push(VarDebugInfo {
name, name,
source_info: debug_source_info, source_info: debug_source_info,
references: 0,
value: VarDebugInfoContents::Place(for_arm_body.into()), value: VarDebugInfoContents::Place(for_arm_body.into()),
argument_index: None, argument_index: None,
}); });
@ -2262,7 +2261,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
self.var_debug_info.push(VarDebugInfo { self.var_debug_info.push(VarDebugInfo {
name, name,
source_info: debug_source_info, source_info: debug_source_info,
references: 0,
value: VarDebugInfoContents::Place(ref_for_guard.into()), value: VarDebugInfoContents::Place(ref_for_guard.into()),
argument_index: None, argument_index: None,
}); });

View file

@ -820,7 +820,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}; };
self.var_debug_info.push(VarDebugInfo { self.var_debug_info.push(VarDebugInfo {
name, name,
references: 0,
source_info: SourceInfo::outermost(captured_place.var_ident.span), source_info: SourceInfo::outermost(captured_place.var_ident.span),
value: VarDebugInfoContents::Place(use_place), value: VarDebugInfoContents::Place(use_place),
argument_index: None, argument_index: None,
@ -851,7 +850,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
self.var_debug_info.push(VarDebugInfo { self.var_debug_info.push(VarDebugInfo {
name, name,
source_info, source_info,
references: 0,
value: VarDebugInfoContents::Place(arg_local.into()), value: VarDebugInfoContents::Place(arg_local.into()),
argument_index: Some(argument_index as u16 + 1), argument_index: Some(argument_index as u16 + 1),
}); });

View file

@ -265,7 +265,6 @@ fn compute_replacement<'tcx>(
targets, targets,
storage_to_remove, storage_to_remove,
allowed_replacements, allowed_replacements,
fully_replacable_locals,
any_replacement: false, any_replacement: false,
}; };
@ -346,7 +345,6 @@ struct Replacer<'tcx> {
storage_to_remove: BitSet<Local>, storage_to_remove: BitSet<Local>,
allowed_replacements: FxHashSet<(Local, Location)>, allowed_replacements: FxHashSet<(Local, Location)>,
any_replacement: bool, any_replacement: bool,
fully_replacable_locals: BitSet<Local>,
} }
impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> { impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
@ -366,12 +364,6 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
if let Some((&PlaceElem::Deref, rest)) = target.projection.split_last() { if let Some((&PlaceElem::Deref, rest)) = target.projection.split_last() {
*place = Place::from(target.local).project_deeper(rest, self.tcx); *place = Place::from(target.local).project_deeper(rest, self.tcx);
self.any_replacement = true; self.any_replacement = true;
} else if self.fully_replacable_locals.contains(place.local)
&& let Some(references) = debuginfo.references.checked_add(1)
{
debuginfo.references = references;
*place = target;
self.any_replacement = true;
} else { } else {
break break
} }

View file

@ -23,7 +23,6 @@ TrivialTypeTraversalImpls! {
(), (),
bool, bool,
usize, usize,
u8,
u16, u16,
u32, u32,
u64, u64,

View file

@ -13,13 +13,16 @@
let mut _8: usize; let mut _8: usize;
let mut _9: usize; let mut _9: usize;
let mut _10: bool; let mut _10: bool;
let mut _11: !; let mut _14: !;
scope 1 { scope 1 {
debug v => _2; debug v => _2;
let _11: &T;
let _12: &T;
let _13: &T;
scope 2 { scope 2 {
debug v1 => &(*_2)[0 of 3]; debug v1 => _11;
debug v2 => &(*_2)[1 of 3]; debug v2 => _12;
debug v3 => &(*_2)[2 of 3]; debug v3 => _13;
} }
} }
@ -39,10 +42,19 @@
} }
bb1: { bb1: {
_11 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable; _14 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
} }
bb2: { bb2: {
StorageLive(_11);
_11 = &(*_2)[0 of 3];
StorageLive(_12);
_12 = &(*_2)[1 of 3];
StorageLive(_13);
_13 = &(*_2)[2 of 3];
StorageDead(_13);
StorageDead(_12);
StorageDead(_11);
StorageDead(_4); StorageDead(_4);
return; return;
} }

View file

@ -13,13 +13,16 @@
let mut _8: usize; let mut _8: usize;
let mut _9: usize; let mut _9: usize;
let mut _10: bool; let mut _10: bool;
let mut _11: !; let mut _14: !;
scope 1 { scope 1 {
debug v => _2; debug v => _2;
let _11: &T;
let _12: &T;
let _13: &T;
scope 2 { scope 2 {
debug v1 => &(*_2)[0 of 3]; debug v1 => _11;
debug v2 => &(*_2)[1 of 3]; debug v2 => _12;
debug v3 => &(*_2)[2 of 3]; debug v3 => _13;
} }
} }
@ -39,10 +42,19 @@
} }
bb1: { bb1: {
_11 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue; _14 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
} }
bb2: { bb2: {
StorageLive(_11);
_11 = &(*_2)[0 of 3];
StorageLive(_12);
_12 = &(*_2)[1 of 3];
StorageLive(_13);
_13 = &(*_2)[2 of 3];
StorageDead(_13);
StorageDead(_12);
StorageDead(_11);
StorageDead(_4); StorageDead(_4);
return; return;
} }

View file

@ -8,8 +8,9 @@ fn num_to_digit(_1: char) -> u32 {
debug self => _1; debug self => _1;
debug radix => const 8_u32; debug radix => const 8_u32;
let _2: std::option::Option<u32>; let _2: std::option::Option<u32>;
let mut _7: &std::option::Option<u32>;
scope 2 (inlined Option::<u32>::is_some) { scope 2 (inlined Option::<u32>::is_some) {
debug self => &_2; debug self => _7;
let mut _3: isize; let mut _3: isize;
} }
} }
@ -23,12 +24,14 @@ fn num_to_digit(_1: char) -> u32 {
} }
bb0: { bb0: {
StorageLive(_7);
StorageLive(_2); StorageLive(_2);
_2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind unreachable]; _2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind unreachable];
} }
bb1: { bb1: {
_3 = discriminant(_2); _3 = discriminant(_2);
StorageDead(_7);
StorageDead(_2); StorageDead(_2);
switchInt(move _3) -> [1: bb2, otherwise: bb7]; switchInt(move _3) -> [1: bb2, otherwise: bb7];
} }

View file

@ -8,8 +8,9 @@ fn num_to_digit(_1: char) -> u32 {
debug self => _1; debug self => _1;
debug radix => const 8_u32; debug radix => const 8_u32;
let _2: std::option::Option<u32>; let _2: std::option::Option<u32>;
let mut _7: &std::option::Option<u32>;
scope 2 (inlined Option::<u32>::is_some) { scope 2 (inlined Option::<u32>::is_some) {
debug self => &_2; debug self => _7;
let mut _3: isize; let mut _3: isize;
} }
} }
@ -23,12 +24,14 @@ fn num_to_digit(_1: char) -> u32 {
} }
bb0: { bb0: {
StorageLive(_7);
StorageLive(_2); StorageLive(_2);
_2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind continue]; _2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind continue];
} }
bb1: { bb1: {
_3 = discriminant(_2); _3 = discriminant(_2);
StorageDead(_7);
StorageDead(_2); StorageDead(_2);
switchInt(move _3) -> [1: bb2, otherwise: bb7]; switchInt(move _3) -> [1: bb2, otherwise: bb7];
} }

View file

@ -22,27 +22,23 @@
let _24: &mut u8; let _24: &mut u8;
let mut _25: debuginfo::T; let mut _25: debuginfo::T;
scope 1 { scope 1 {
- debug ref_mut_u8 => _1; debug ref_mut_u8 => _1;
+ debug ref_mut_u8 => &_2;
let _3: &u8; let _3: &u8;
let mut _28: &debuginfo::T; let mut _28: &debuginfo::T;
scope 2 { scope 2 {
- debug field => _3; debug field => _3;
+ debug field => &((*_28).0: u8);
let _5: &u8; let _5: &u8;
scope 3 { scope 3 {
- debug reborrow => _5; - debug reborrow => _5;
+ debug reborrow => &_2; + debug reborrow => _1;
let _9: &i32; let _9: &i32;
let _22: &&&mut u8; let _22: &&&mut u8;
let mut _27: &std::option::Option<i32>; let mut _27: &std::option::Option<i32>;
scope 4 { scope 4 {
- debug variant_field => _9; debug variant_field => _9;
+ debug variant_field => &(((*_27) as Some).0: i32);
} }
scope 5 { scope 5 {
- debug constant_index => _19; debug constant_index => _19;
+ debug constant_index => &(*_11)[1 of 3];
debug subslice => _20; debug subslice => _20;
debug constant_index_from_end => _21; debug constant_index_from_end => _21;
let _19: &i32; let _19: &i32;
@ -51,21 +47,20 @@
let mut _26: &[i32; 10]; let mut _26: &[i32; 10];
} }
scope 6 { scope 6 {
- debug multiple_borrow => _22; debug multiple_borrow => _22;
+ debug multiple_borrow => &&&(_25.0: u8);
} }
} }
} }
} }
bb0: { bb0: {
- StorageLive(_1); StorageLive(_1);
StorageLive(_2); StorageLive(_2);
_2 = const 5_u8; _2 = const 5_u8;
- _1 = &mut _2; _1 = &mut _2;
- StorageLive(_3); StorageLive(_3);
_28 = const _; _28 = const _;
- _3 = &((*_28).0: u8); _3 = &((*_28).0: u8);
- StorageLive(_5); - StorageLive(_5);
- _5 = &(*_1); - _5 = &(*_1);
- StorageLive(_6); - StorageLive(_6);
@ -76,11 +71,11 @@
} }
bb1: { bb1: {
- StorageLive(_9); StorageLive(_9);
_27 = const _; _27 = const _;
- _9 = &(((*_27) as Some).0: i32); _9 = &(((*_27) as Some).0: i32);
- _6 = const (); - _6 = const ();
- StorageDead(_9); StorageDead(_9);
goto -> bb4; goto -> bb4;
} }
@ -118,8 +113,8 @@
} }
bb6: { bb6: {
- StorageLive(_19); StorageLive(_19);
- _19 = &(*_11)[1 of 3]; _19 = &(*_11)[1 of 3];
StorageLive(_20); StorageLive(_20);
_20 = &(*_11)[2:-1]; _20 = &(*_11)[2:-1];
StorageLive(_21); StorageLive(_21);
@ -127,7 +122,7 @@
- _10 = const (); - _10 = const ();
StorageDead(_21); StorageDead(_21);
StorageDead(_20); StorageDead(_20);
- StorageDead(_19); StorageDead(_19);
goto -> bb8; goto -> bb8;
} }
@ -140,23 +135,23 @@
StorageDead(_12); StorageDead(_12);
StorageDead(_11); StorageDead(_11);
- StorageDead(_10); - StorageDead(_10);
- StorageLive(_22); StorageLive(_22);
- StorageLive(_23); StorageLive(_23);
- StorageLive(_24); StorageLive(_24);
StorageLive(_25); StorageLive(_25);
_25 = T(const 6_u8); _25 = T(const 6_u8);
- _24 = &mut (_25.0: u8); _24 = &mut (_25.0: u8);
- _23 = &_24; _23 = &_24;
- _22 = &_23; _22 = &_23;
_0 = const (); _0 = const ();
StorageDead(_25); StorageDead(_25);
- StorageDead(_24); StorageDead(_24);
- StorageDead(_23); StorageDead(_23);
- StorageDead(_22); StorageDead(_22);
- StorageDead(_5); - StorageDead(_5);
- StorageDead(_3); StorageDead(_3);
StorageDead(_2); StorageDead(_2);
- StorageDead(_1); StorageDead(_1);
return; return;
} }
} }

View file

@ -13,16 +13,15 @@
debug x => _1; debug x => _1;
let _2: &mut i32; let _2: &mut i32;
scope 2 { scope 2 {
- debug xref => _2; debug xref => _2;
+ debug xref => &_1;
let _3: *mut i32; let _3: *mut i32;
scope 3 { scope 3 {
- debug xraw => _3; - debug xraw => _3;
+ debug xraw => &_1; + debug xraw => _2;
let _6: &i32; let _6: &i32;
scope 4 { scope 4 {
- debug xshr => _6; - debug xshr => _6;
+ debug xshr => &_1; + debug xshr => _2;
let _7: i32; let _7: i32;
scope 5 { scope 5 {
debug a => _7; debug a => _7;
@ -38,7 +37,7 @@
StorageLive(_1); StorageLive(_1);
_1 = const 2_i32; _1 = const 2_i32;
- StorageLive(_2); - StorageLive(_2);
- _2 = &mut _1; _2 = &mut _1;
- StorageLive(_3); - StorageLive(_3);
- StorageLive(_4); - StorageLive(_4);
- StorageLive(_5); - StorageLive(_5);

View file

@ -52,8 +52,7 @@
debug a => _4; debug a => _4;
let _5: &usize; let _5: &usize;
scope 2 { scope 2 {
- debug b => _5; debug b => _5;
+ debug b => &_4;
let _6: usize; let _6: usize;
scope 3 { scope 3 {
debug c => _6; debug c => _6;
@ -158,12 +157,10 @@
debug a => _60; debug a => _60;
let _61: &usize; let _61: &usize;
scope 30 { scope 30 {
- debug b => _61; debug b => _61;
+ debug b => &_60;
let _62: &&usize; let _62: &&usize;
scope 31 { scope 31 {
- debug d => _62; debug d => _62;
+ debug d => &&_60;
let _63: usize; let _63: usize;
scope 32 { scope 32 {
debug c => _63; debug c => _63;
@ -175,12 +172,10 @@
debug a => _66; debug a => _66;
let mut _67: &usize; let mut _67: &usize;
scope 34 { scope 34 {
- debug b => _67; debug b => _67;
+ debug b => &_66;
let _68: &mut &usize; let _68: &mut &usize;
scope 35 { scope 35 {
- debug d => _68; debug d => _68;
+ debug d => &&_66;
let _69: usize; let _69: usize;
scope 36 { scope 36 {
debug c => _69; debug c => _69;
@ -193,8 +188,8 @@
- StorageLive(_3); - StorageLive(_3);
StorageLive(_4); StorageLive(_4);
_4 = const 5_usize; _4 = const 5_usize;
- StorageLive(_5); StorageLive(_5);
- _5 = &_4; _5 = &_4;
StorageLive(_6); StorageLive(_6);
- _6 = (*_5); - _6 = (*_5);
+ _6 = _4; + _6 = _4;
@ -209,7 +204,7 @@
StorageDead(_7); StorageDead(_7);
- _3 = const (); - _3 = const ();
StorageDead(_6); StorageDead(_6);
- StorageDead(_5); StorageDead(_5);
StorageDead(_4); StorageDead(_4);
- StorageDead(_3); - StorageDead(_3);
- StorageLive(_9); - StorageLive(_9);
@ -394,13 +389,12 @@
- StorageLive(_59); - StorageLive(_59);
StorageLive(_60); StorageLive(_60);
_60 = const 5_usize; _60 = const 5_usize;
- StorageLive(_61); StorageLive(_61);
- _61 = &_60; _61 = &_60;
- StorageLive(_62); StorageLive(_62);
- _62 = &_61; _62 = &_61;
StorageLive(_63); StorageLive(_63);
- _63 = (*_61); _63 = (*_61);
+ _63 = _60;
StorageLive(_64); StorageLive(_64);
StorageLive(_65); StorageLive(_65);
_65 = (); _65 = ();
@ -412,19 +406,18 @@
StorageDead(_64); StorageDead(_64);
- _59 = const (); - _59 = const ();
StorageDead(_63); StorageDead(_63);
- StorageDead(_62); StorageDead(_62);
- StorageDead(_61); StorageDead(_61);
StorageDead(_60); StorageDead(_60);
- StorageDead(_59); - StorageDead(_59);
StorageLive(_66); StorageLive(_66);
_66 = const 5_usize; _66 = const 5_usize;
- StorageLive(_67); StorageLive(_67);
- _67 = &_66; _67 = &_66;
- StorageLive(_68); StorageLive(_68);
- _68 = &mut _67; _68 = &mut _67;
StorageLive(_69); StorageLive(_69);
- _69 = (*_67); _69 = (*_67);
+ _69 = _66;
StorageLive(_70); StorageLive(_70);
StorageLive(_71); StorageLive(_71);
_71 = (); _71 = ();
@ -436,8 +429,8 @@
StorageDead(_70); StorageDead(_70);
_0 = const (); _0 = const ();
StorageDead(_69); StorageDead(_69);
- StorageDead(_68); StorageDead(_68);
- StorageDead(_67); StorageDead(_67);
StorageDead(_66); StorageDead(_66);
return; return;
} }

View file

@ -45,8 +45,7 @@
debug a => _4; debug a => _4;
let _5: *const usize; let _5: *const usize;
scope 3 { scope 3 {
- debug b => _5; debug b => _5;
+ debug b => &_4;
let _6: usize; let _6: usize;
scope 4 { scope 4 {
debug c => _6; debug c => _6;
@ -175,12 +174,10 @@
debug a => _58; debug a => _58;
let _59: *const usize; let _59: *const usize;
scope 39 { scope 39 {
- debug b => _59; debug b => _59;
+ debug b => &_58;
let _60: *const usize; let _60: *const usize;
scope 40 { scope 40 {
- debug c => _60; debug c => _60;
+ debug c => &_58;
let _61: usize; let _61: usize;
scope 41 { scope 41 {
debug e => _61; debug e => _61;
@ -195,12 +192,10 @@
debug a => _65; debug a => _65;
let _66: *const usize; let _66: *const usize;
scope 44 { scope 44 {
- debug b => _66; debug b => _66;
+ debug b => &_65;
let _67: &*const usize; let _67: &*const usize;
scope 45 { scope 45 {
- debug d => _67; debug d => _67;
+ debug d => &&_65;
let _68: usize; let _68: usize;
scope 46 { scope 46 {
debug c => _68; debug c => _68;
@ -215,12 +210,10 @@
debug a => _71; debug a => _71;
let mut _72: *const usize; let mut _72: *const usize;
scope 49 { scope 49 {
- debug b => _72; debug b => _72;
+ debug b => &_71;
let _73: &mut *const usize; let _73: &mut *const usize;
scope 50 { scope 50 {
- debug d => _73; debug d => _73;
+ debug d => &&_71;
let _74: usize; let _74: usize;
scope 51 { scope 51 {
debug c => _74; debug c => _74;
@ -234,8 +227,8 @@
- StorageLive(_3); - StorageLive(_3);
StorageLive(_4); StorageLive(_4);
_4 = const 5_usize; _4 = const 5_usize;
- StorageLive(_5); StorageLive(_5);
- _5 = &raw const _4; _5 = &raw const _4;
StorageLive(_6); StorageLive(_6);
- _6 = (*_5); - _6 = (*_5);
+ _6 = _4; + _6 = _4;
@ -250,7 +243,7 @@
StorageDead(_7); StorageDead(_7);
- _3 = const (); - _3 = const ();
StorageDead(_6); StorageDead(_6);
- StorageDead(_5); StorageDead(_5);
StorageDead(_4); StorageDead(_4);
- StorageDead(_3); - StorageDead(_3);
- StorageLive(_9); - StorageLive(_9);
@ -427,10 +420,11 @@
- StorageLive(_57); - StorageLive(_57);
StorageLive(_58); StorageLive(_58);
_58 = const 13_usize; _58 = const 13_usize;
- StorageLive(_59); StorageLive(_59);
- _59 = &raw const _58; _59 = &raw const _58;
- StorageLive(_60); StorageLive(_60);
- _60 = &raw const (*_59); - _60 = &raw const (*_59);
+ _60 = &raw const _58;
StorageLive(_61); StorageLive(_61);
- _61 = (*_60); - _61 = (*_60);
+ _61 = _58; + _61 = _58;
@ -445,20 +439,19 @@
StorageDead(_62); StorageDead(_62);
- _57 = const (); - _57 = const ();
StorageDead(_61); StorageDead(_61);
- StorageDead(_60); StorageDead(_60);
- StorageDead(_59); StorageDead(_59);
StorageDead(_58); StorageDead(_58);
- StorageDead(_57); - StorageDead(_57);
- StorageLive(_64); - StorageLive(_64);
StorageLive(_65); StorageLive(_65);
_65 = const 5_usize; _65 = const 5_usize;
- StorageLive(_66); StorageLive(_66);
- _66 = &raw const _65; _66 = &raw const _65;
- StorageLive(_67); StorageLive(_67);
- _67 = &_66; _67 = &_66;
StorageLive(_68); StorageLive(_68);
- _68 = (*_66); _68 = (*_66);
+ _68 = _65;
StorageLive(_69); StorageLive(_69);
StorageLive(_70); StorageLive(_70);
_70 = (); _70 = ();
@ -470,19 +463,18 @@
StorageDead(_69); StorageDead(_69);
- _64 = const (); - _64 = const ();
StorageDead(_68); StorageDead(_68);
- StorageDead(_67); StorageDead(_67);
- StorageDead(_66); StorageDead(_66);
StorageDead(_65); StorageDead(_65);
- StorageDead(_64); - StorageDead(_64);
StorageLive(_71); StorageLive(_71);
_71 = const 5_usize; _71 = const 5_usize;
- StorageLive(_72); StorageLive(_72);
- _72 = &raw const _71; _72 = &raw const _71;
- StorageLive(_73); StorageLive(_73);
- _73 = &mut _72; _73 = &mut _72;
StorageLive(_74); StorageLive(_74);
- _74 = (*_72); _74 = (*_72);
+ _74 = _71;
StorageLive(_75); StorageLive(_75);
StorageLive(_76); StorageLive(_76);
_76 = (); _76 = ();
@ -494,8 +486,8 @@
StorageDead(_75); StorageDead(_75);
_0 = const (); _0 = const ();
StorageDead(_74); StorageDead(_74);
- StorageDead(_73); StorageDead(_73);
- StorageDead(_72); StorageDead(_72);
StorageDead(_71); StorageDead(_71);
return; return;
} }

View file

@ -52,8 +52,7 @@
debug a => _4; debug a => _4;
let _5: &mut usize; let _5: &mut usize;
scope 2 { scope 2 {
- debug b => _5; debug b => _5;
+ debug b => &_4;
let _6: usize; let _6: usize;
scope 3 { scope 3 {
debug c => _6; debug c => _6;
@ -158,12 +157,10 @@
debug a => _60; debug a => _60;
let _61: &mut usize; let _61: &mut usize;
scope 30 { scope 30 {
- debug b => _61; debug b => _61;
+ debug b => &_60;
let _62: &&mut usize; let _62: &&mut usize;
scope 31 { scope 31 {
- debug d => _62; debug d => _62;
+ debug d => &&_60;
let _63: usize; let _63: usize;
scope 32 { scope 32 {
debug c => _63; debug c => _63;
@ -175,12 +172,10 @@
debug a => _66; debug a => _66;
let mut _67: &mut usize; let mut _67: &mut usize;
scope 34 { scope 34 {
- debug b => _67; debug b => _67;
+ debug b => &_66;
let _68: &mut &mut usize; let _68: &mut &mut usize;
scope 35 { scope 35 {
- debug d => _68; debug d => _68;
+ debug d => &&_66;
let _69: usize; let _69: usize;
scope 36 { scope 36 {
debug c => _69; debug c => _69;
@ -193,8 +188,8 @@
- StorageLive(_3); - StorageLive(_3);
StorageLive(_4); StorageLive(_4);
_4 = const 5_usize; _4 = const 5_usize;
- StorageLive(_5); StorageLive(_5);
- _5 = &mut _4; _5 = &mut _4;
StorageLive(_6); StorageLive(_6);
- _6 = (*_5); - _6 = (*_5);
+ _6 = _4; + _6 = _4;
@ -209,7 +204,7 @@
StorageDead(_7); StorageDead(_7);
- _3 = const (); - _3 = const ();
StorageDead(_6); StorageDead(_6);
- StorageDead(_5); StorageDead(_5);
StorageDead(_4); StorageDead(_4);
- StorageDead(_3); - StorageDead(_3);
- StorageLive(_9); - StorageLive(_9);
@ -391,13 +386,12 @@
- StorageLive(_59); - StorageLive(_59);
StorageLive(_60); StorageLive(_60);
_60 = const 5_usize; _60 = const 5_usize;
- StorageLive(_61); StorageLive(_61);
- _61 = &mut _60; _61 = &mut _60;
- StorageLive(_62); StorageLive(_62);
- _62 = &_61; _62 = &_61;
StorageLive(_63); StorageLive(_63);
- _63 = (*_61); _63 = (*_61);
+ _63 = _60;
StorageLive(_64); StorageLive(_64);
StorageLive(_65); StorageLive(_65);
_65 = (); _65 = ();
@ -409,19 +403,18 @@
StorageDead(_64); StorageDead(_64);
- _59 = const (); - _59 = const ();
StorageDead(_63); StorageDead(_63);
- StorageDead(_62); StorageDead(_62);
- StorageDead(_61); StorageDead(_61);
StorageDead(_60); StorageDead(_60);
- StorageDead(_59); - StorageDead(_59);
StorageLive(_66); StorageLive(_66);
_66 = const 5_usize; _66 = const 5_usize;
- StorageLive(_67); StorageLive(_67);
- _67 = &mut _66; _67 = &mut _66;
- StorageLive(_68); StorageLive(_68);
- _68 = &mut _67; _68 = &mut _67;
StorageLive(_69); StorageLive(_69);
- _69 = (*_67); _69 = (*_67);
+ _69 = _66;
StorageLive(_70); StorageLive(_70);
StorageLive(_71); StorageLive(_71);
_71 = (); _71 = ();
@ -433,8 +426,8 @@
StorageDead(_70); StorageDead(_70);
_0 = const (); _0 = const ();
StorageDead(_69); StorageDead(_69);
- StorageDead(_68); StorageDead(_68);
- StorageDead(_67); StorageDead(_67);
StorageDead(_66); StorageDead(_66);
return; return;
} }

View file

@ -42,8 +42,7 @@
debug a => _4; debug a => _4;
let _5: *mut usize; let _5: *mut usize;
scope 3 { scope 3 {
- debug b => _5; debug b => _5;
+ debug b => &_4;
let _6: usize; let _6: usize;
scope 4 { scope 4 {
debug c => _6; debug c => _6;
@ -172,12 +171,10 @@
debug a => _58; debug a => _58;
let _59: *mut usize; let _59: *mut usize;
scope 39 { scope 39 {
- debug b => _59; debug b => _59;
+ debug b => &_58;
let _60: &*mut usize; let _60: &*mut usize;
scope 40 { scope 40 {
- debug d => _60; debug d => _60;
+ debug d => &&_58;
let _61: usize; let _61: usize;
scope 41 { scope 41 {
debug c => _61; debug c => _61;
@ -192,12 +189,10 @@
debug a => _64; debug a => _64;
let mut _65: *mut usize; let mut _65: *mut usize;
scope 44 { scope 44 {
- debug b => _65; debug b => _65;
+ debug b => &_64;
let _66: &mut *mut usize; let _66: &mut *mut usize;
scope 45 { scope 45 {
- debug d => _66; debug d => _66;
+ debug d => &&_64;
let _67: usize; let _67: usize;
scope 46 { scope 46 {
debug c => _67; debug c => _67;
@ -211,8 +206,8 @@
- StorageLive(_3); - StorageLive(_3);
StorageLive(_4); StorageLive(_4);
_4 = const 5_usize; _4 = const 5_usize;
- StorageLive(_5); StorageLive(_5);
- _5 = &raw mut _4; _5 = &raw mut _4;
StorageLive(_6); StorageLive(_6);
- _6 = (*_5); - _6 = (*_5);
+ _6 = _4; + _6 = _4;
@ -227,7 +222,7 @@
StorageDead(_7); StorageDead(_7);
- _3 = const (); - _3 = const ();
StorageDead(_6); StorageDead(_6);
- StorageDead(_5); StorageDead(_5);
StorageDead(_4); StorageDead(_4);
- StorageDead(_3); - StorageDead(_3);
- StorageLive(_9); - StorageLive(_9);
@ -401,13 +396,12 @@
- StorageLive(_57); - StorageLive(_57);
StorageLive(_58); StorageLive(_58);
_58 = const 5_usize; _58 = const 5_usize;
- StorageLive(_59); StorageLive(_59);
- _59 = &raw mut _58; _59 = &raw mut _58;
- StorageLive(_60); StorageLive(_60);
- _60 = &_59; _60 = &_59;
StorageLive(_61); StorageLive(_61);
- _61 = (*_59); _61 = (*_59);
+ _61 = _58;
StorageLive(_62); StorageLive(_62);
StorageLive(_63); StorageLive(_63);
_63 = (); _63 = ();
@ -419,19 +413,18 @@
StorageDead(_62); StorageDead(_62);
- _57 = const (); - _57 = const ();
StorageDead(_61); StorageDead(_61);
- StorageDead(_60); StorageDead(_60);
- StorageDead(_59); StorageDead(_59);
StorageDead(_58); StorageDead(_58);
- StorageDead(_57); - StorageDead(_57);
StorageLive(_64); StorageLive(_64);
_64 = const 5_usize; _64 = const 5_usize;
- StorageLive(_65); StorageLive(_65);
- _65 = &raw mut _64; _65 = &raw mut _64;
- StorageLive(_66); StorageLive(_66);
- _66 = &mut _65; _66 = &mut _65;
StorageLive(_67); StorageLive(_67);
- _67 = (*_65); _67 = (*_65);
+ _67 = _64;
StorageLive(_68); StorageLive(_68);
StorageLive(_69); StorageLive(_69);
_69 = (); _69 = ();
@ -443,8 +436,8 @@
StorageDead(_68); StorageDead(_68);
_0 = const (); _0 = const ();
StorageDead(_67); StorageDead(_67);
- StorageDead(_66); StorageDead(_66);
- StorageDead(_65); StorageDead(_65);
StorageDead(_64); StorageDead(_64);
return; return;
} }