Skip to content

Commit

Permalink
Normalize away pairs of line:col numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
anyska committed Apr 7, 2020
1 parent e0bb75e commit ea4aca1
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 167 deletions.
Expand Up @@ -4,7 +4,7 @@
fn hello() -> () {
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
let mut _2: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
let mut _2: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL

bb0: {
StorageLive(_1); // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
Expand Down Expand Up @@ -35,19 +35,19 @@
}

bb2: {
StorageLive(_2); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
const std::rt::begin_panic::<&str>(const "explicit panic"); // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
StorageLive(_2); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
const std::rt::begin_panic::<&str>(const "explicit panic"); // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
// ty::Const
// + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 13:46
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
// + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: &str
// + val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 })
// mir::Constant
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 12:45
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) }
}
}
Expand Down
Expand Up @@ -5,7 +5,7 @@ fn unwrap(_1: std::option::Option<T>) -> T {
let mut _0: T; // return place in scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:33: 7:34
let mut _2: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16
let _3: T; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15
let mut _4: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
let mut _4: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
let mut _5: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2
let mut _6: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2
scope 1 {
Expand All @@ -22,19 +22,19 @@ fn unwrap(_1: std::option::Option<T>) -> T {
}

bb2: {
StorageLive(_4); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
StorageLive(_4); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
// ty::Const
// + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 13:46
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
// + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: &str
// + val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 })
// mir::Constant
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 12:45
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) }
}

Expand Down
@@ -1,23 +1,23 @@
// MIR for `std::intrinsics::drop_in_place` after SimplifyCfg-make_shim

fn std::intrinsics::drop_in_place(_1: *mut Test) -> () {
let mut _0: (); // return place in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
let mut _2: &mut Test; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
let mut _0: (); // return place in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
let mut _2: &mut Test; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL

bb0: {
Retag([raw] _1); // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
_2 = &mut (*_1); // bb0[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
_3 = const <Test as std::ops::Drop>::drop(move _2) -> bb1; // bb0[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
Retag([raw] _1); // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
_2 = &mut (*_1); // bb0[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
_3 = const <Test as std::ops::Drop>::drop(move _2) -> bb1; // bb0[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
// ty::Const
// + ty: for<'r> fn(&'r mut Test) {<Test as std::ops::Drop>::drop}
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
// + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL
// + literal: Const { ty: for<'r> fn(&'r mut Test) {<Test as std::ops::Drop>::drop}, val: Value(Scalar(<ZST>)) }
}

bb1: {
return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
}
}
Expand Up @@ -21,10 +21,10 @@
debug err => _6; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
scope 3 {
scope 7 {
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
}
scope 8 {
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
}
}
Expand All @@ -35,7 +35,7 @@
}
}
scope 6 {
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
}

bb0: {
Expand All @@ -55,11 +55,11 @@

bb2: {
- _6 = ((_1 as Err).0: i32); // bb2[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
- ((_0 as Err).0: i32) = move _6; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
- discriminant(_0) = 1; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
+ _0 = move _1; // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
+ nop; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
+ nop; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
- ((_0 as Err).0: i32) = move _6; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
- discriminant(_0) = 1; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+ _0 = move _1; // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+ nop; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+ nop; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
goto -> bb3; // bb2[3]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
}

Expand Down
Expand Up @@ -20,10 +20,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
debug err => _6; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
scope 3 {
scope 7 {
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
}
scope 8 {
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
}
}
Expand All @@ -34,7 +34,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
}
}
scope 6 {
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
}

bb0: {
Expand Down
Expand Up @@ -12,10 +12,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
debug err => _2; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
scope 3 {
scope 7 {
debug t => _2; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
debug t => _2; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
}
scope 8 {
debug v => _2; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
debug v => _2; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
}
}
}
Expand All @@ -25,7 +25,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
}
}
scope 6 {
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
}

bb0: {
Expand Down

0 comments on commit ea4aca1

Please sign in to comment.