blob: 2f0d83f92792d3d2e10173c893985ac787085164 [file] [log] [blame] [edit]
- // MIR for `chained_conditions` before JumpThreading
+ // MIR for `chained_conditions` after JumpThreading
fn chained_conditions() -> u8 {
let mut _0: u8;
let _1: chained_conditions::BacktraceStyle;
let mut _2: std::option::Option<std::string::String>;
let mut _3: &std::option::Option<std::string::String>;
let mut _4: isize;
let _5: std::string::String;
let _6: &std::string::String;
let mut _7: bool;
let mut _8: &&std::string::String;
let _9: &std::string::String;
let mut _10: &&str;
let _11: &str;
let _12: std::string::String;
let _13: &std::string::String;
let mut _14: bool;
let mut _15: &&std::string::String;
let _16: &std::string::String;
let mut _17: &&str;
let _18: &str;
let mut _19: isize;
let mut _20: &&str;
let mut _21: &&str;
let mut _22: bool;
let mut _23: bool;
let mut _24: isize;
let mut _25: isize;
let mut _26: isize;
scope 1 {
debug format => _1;
}
scope 2 {
debug x => _5;
debug x => _6;
}
scope 3 {
debug x => _12;
debug x => _13;
}
scope 4 (inlined std::cmp::impls::<impl PartialEq<&str> for &String>::eq) {
let mut _27: &std::string::String;
let mut _28: &str;
scope 5 (inlined <String as PartialEq<str>>::eq) {
scope 6 (inlined #[track_caller] <String as Index<RangeFull>>::index) {
let _29: &str;
scope 7 (inlined String::as_str) {
let _30: &[u8];
scope 8 (inlined Vec::<u8>::as_slice) {
let _31: *const [u8];
let mut _32: *const u8;
let mut _33: usize;
scope 9 (inlined Vec::<u8>::as_ptr) {
scope 10 (inlined alloc::raw_vec::RawVec::<u8>::ptr) {
scope 11 (inlined alloc::raw_vec::RawVecInner::ptr::<u8>) {
scope 12 (inlined alloc::raw_vec::RawVecInner::non_null::<u8>) {
let mut _34: std::ptr::NonNull<u8>;
scope 13 (inlined Unique::<u8>::cast::<u8>) {
scope 14 (inlined NonNull::<u8>::cast::<u8>) {
scope 15 (inlined NonNull::<u8>::as_ptr) {
}
}
}
scope 16 (inlined Unique::<u8>::as_non_null_ptr) {
}
}
scope 17 (inlined NonNull::<u8>::as_ptr) {
}
}
}
}
}
scope 18 (inlined from_utf8_unchecked) {
}
}
scope 19 (inlined #[track_caller] core::str::traits::<impl SliceIndex<str> for RangeFull>::index) {
}
}
scope 20 (inlined #[track_caller] core::str::traits::<impl Index<RangeFull> for str>::index) {
scope 21 (inlined #[track_caller] core::str::traits::<impl SliceIndex<str> for RangeFull>::index) {
}
}
scope 22 (inlined core::str::traits::<impl PartialEq for str>::eq) {
let mut _35: &&[u8];
let _36: &[u8];
let mut _37: &&[u8];
let _38: &[u8];
scope 23 (inlined core::str::<impl str>::as_bytes) {
}
scope 24 (inlined core::str::<impl str>::as_bytes) {
}
scope 25 (inlined std::cmp::impls::<impl PartialEq for &[u8]>::eq) {
scope 26 (inlined core::slice::cmp::<impl PartialEq for [u8]>::eq) {
}
}
}
}
}
scope 27 (inlined std::cmp::impls::<impl PartialEq<&str> for &String>::eq) {
let mut _39: &std::string::String;
let mut _40: &str;
scope 28 (inlined <String as PartialEq<str>>::eq) {
scope 29 (inlined #[track_caller] <String as Index<RangeFull>>::index) {
let _41: &str;
scope 30 (inlined String::as_str) {
let _42: &[u8];
scope 31 (inlined Vec::<u8>::as_slice) {
let _43: *const [u8];
let mut _44: *const u8;
let mut _45: usize;
scope 32 (inlined Vec::<u8>::as_ptr) {
scope 33 (inlined alloc::raw_vec::RawVec::<u8>::ptr) {
scope 34 (inlined alloc::raw_vec::RawVecInner::ptr::<u8>) {
scope 35 (inlined alloc::raw_vec::RawVecInner::non_null::<u8>) {
let mut _46: std::ptr::NonNull<u8>;
scope 36 (inlined Unique::<u8>::cast::<u8>) {
scope 37 (inlined NonNull::<u8>::cast::<u8>) {
scope 38 (inlined NonNull::<u8>::as_ptr) {
}
}
}
scope 39 (inlined Unique::<u8>::as_non_null_ptr) {
}
}
scope 40 (inlined NonNull::<u8>::as_ptr) {
}
}
}
}
}
scope 41 (inlined from_utf8_unchecked) {
}
}
scope 42 (inlined #[track_caller] core::str::traits::<impl SliceIndex<str> for RangeFull>::index) {
}
}
scope 43 (inlined #[track_caller] core::str::traits::<impl Index<RangeFull> for str>::index) {
scope 44 (inlined #[track_caller] core::str::traits::<impl SliceIndex<str> for RangeFull>::index) {
}
}
scope 45 (inlined core::str::traits::<impl PartialEq for str>::eq) {
let mut _47: &&[u8];
let _48: &[u8];
let mut _49: &&[u8];
let _50: &[u8];
scope 46 (inlined core::str::<impl str>::as_bytes) {
}
scope 47 (inlined core::str::<impl str>::as_bytes) {
}
scope 48 (inlined std::cmp::impls::<impl PartialEq for &[u8]>::eq) {
scope 49 (inlined core::slice::cmp::<impl PartialEq for [u8]>::eq) {
}
}
}
}
}
bb0: {
_22 = const false;
_23 = const false;
StorageLive(_1);
StorageLive(_2);
_22 = const true;
_23 = const true;
_2 = env_var() -> [return: bb1, unwind continue];
}
bb1: {
_4 = discriminant(_2);
switchInt(move _4) -> [0: bb3, 1: bb4, otherwise: bb2];
}
bb2: {
unreachable;
}
bb3: {
_1 = chained_conditions::BacktraceStyle::Off;
- goto -> bb19;
+ goto -> bb27;
}
bb4: {
StorageLive(_6);
_6 = &((_2 as Some).0: std::string::String);
StorageLive(_7);
StorageLive(_8);
StorageLive(_9);
_9 = &(*_6);
_8 = &_9;
StorageLive(_10);
_21 = const chained_conditions::promoted[1];
_10 = &(*_21);
StorageLive(_27);
StorageLive(_28);
_27 = copy (*_8);
_28 = copy (*_10);
StorageLive(_29);
StorageLive(_30);
StorageLive(_31);
StorageLive(_32);
StorageLive(_34);
_34 = copy ((((((*_27).0: std::vec::Vec<u8>).0: alloc::raw_vec::RawVec<u8>).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique<u8>).0: std::ptr::NonNull<u8>);
_32 = copy _34 as *const u8 (Transmute);
StorageDead(_34);
StorageLive(_33);
_33 = copy (((*_27).0: std::vec::Vec<u8>).1: usize);
_31 = *const [u8] from (copy _32, move _33);
StorageDead(_33);
StorageDead(_32);
_30 = &(*_31);
StorageDead(_31);
_29 = copy _30 as &str (Transmute);
StorageDead(_30);
StorageLive(_36);
StorageLive(_38);
_36 = copy _29 as &[u8] (Transmute);
_38 = copy _28 as &[u8] (Transmute);
_7 = <[u8] as core::slice::cmp::SlicePartialEq<u8>>::equal(move _36, move _38) -> [return: bb23, unwind: bb22];
}
bb5: {
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
StorageLive(_5);
_23 = const false;
_5 = move ((_2 as Some).0: std::string::String);
_1 = chained_conditions::BacktraceStyle::Full;
drop(_5) -> [return: bb7, unwind: bb22];
}
bb6: {
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
StorageDead(_6);
StorageLive(_13);
_13 = &((_2 as Some).0: std::string::String);
StorageLive(_14);
StorageLive(_15);
StorageLive(_16);
_16 = &(*_13);
_15 = &_16;
StorageLive(_17);
_20 = const chained_conditions::promoted[0];
_17 = &(*_20);
StorageLive(_39);
StorageLive(_40);
_39 = copy (*_15);
_40 = copy (*_17);
StorageLive(_41);
StorageLive(_42);
StorageLive(_43);
StorageLive(_44);
StorageLive(_46);
_46 = copy ((((((*_39).0: std::vec::Vec<u8>).0: alloc::raw_vec::RawVec<u8>).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique<u8>).0: std::ptr::NonNull<u8>);
_44 = copy _46 as *const u8 (Transmute);
StorageDead(_46);
StorageLive(_45);
_45 = copy (((*_39).0: std::vec::Vec<u8>).1: usize);
_43 = *const [u8] from (copy _44, move _45);
StorageDead(_45);
StorageDead(_44);
_42 = &(*_43);
StorageDead(_43);
_41 = copy _42 as &str (Transmute);
StorageDead(_42);
StorageLive(_48);
StorageLive(_50);
_48 = copy _41 as &[u8] (Transmute);
_50 = copy _40 as &[u8] (Transmute);
_14 = <[u8] as core::slice::cmp::SlicePartialEq<u8>>::equal(move _48, move _50) -> [return: bb24, unwind: bb22];
}
bb7: {
StorageDead(_5);
StorageDead(_6);
- goto -> bb19;
+ goto -> bb25;
}
bb8: {
StorageDead(_17);
StorageDead(_16);
StorageDead(_15);
StorageDead(_14);
StorageLive(_12);
_23 = const false;
_12 = move ((_2 as Some).0: std::string::String);
_1 = chained_conditions::BacktraceStyle::Off;
drop(_12) -> [return: bb10, unwind: bb22];
}
bb9: {
StorageDead(_17);
StorageDead(_16);
StorageDead(_15);
StorageDead(_14);
StorageDead(_13);
_1 = chained_conditions::BacktraceStyle::Short;
- goto -> bb19;
+ goto -> bb27;
}
bb10: {
StorageDead(_12);
StorageDead(_13);
- goto -> bb19;
+ goto -> bb25;
}
bb11: {
_0 = const 3_u8;
goto -> bb14;
}
bb12: {
_0 = const 2_u8;
goto -> bb14;
}
bb13: {
_0 = const 1_u8;
goto -> bb14;
}
bb14: {
StorageDead(_1);
return;
}
bb15 (cleanup): {
resume;
}
bb16: {
_22 = const false;
_23 = const false;
StorageDead(_2);
_19 = discriminant(_1);
switchInt(move _19) -> [0: bb13, 1: bb12, 2: bb11, otherwise: bb2];
}
bb17: {
switchInt(copy _23) -> [0: bb16, otherwise: bb18];
}
bb18: {
drop(((_2 as Some).0: std::string::String)) -> [return: bb16, unwind: bb15];
}
bb19: {
_24 = discriminant(_2);
switchInt(move _24) -> [1: bb17, otherwise: bb16];
}
bb20 (cleanup): {
switchInt(copy _23) -> [0: bb15, otherwise: bb21];
}
bb21 (cleanup): {
drop(((_2 as Some).0: std::string::String)) -> [return: bb15, unwind terminate(cleanup)];
}
bb22 (cleanup): {
_26 = discriminant(_2);
switchInt(move _26) -> [1: bb20, otherwise: bb15];
}
bb23: {
StorageDead(_38);
StorageDead(_36);
StorageDead(_29);
StorageDead(_28);
StorageDead(_27);
switchInt(move _7) -> [0: bb6, otherwise: bb5];
}
bb24: {
StorageDead(_50);
StorageDead(_48);
StorageDead(_41);
StorageDead(_40);
StorageDead(_39);
switchInt(move _14) -> [0: bb9, otherwise: bb8];
+ }
+
+ bb25: {
+ _24 = discriminant(_2);
+ switchInt(move _24) -> [1: bb26, otherwise: bb16];
+ }
+
+ bb26: {
+ goto -> bb16;
+ }
+
+ bb27: {
+ _24 = discriminant(_2);
+ switchInt(move _24) -> [1: bb28, otherwise: bb16];
+ }
+
+ bb28: {
+ goto -> bb18;
}
}