2020-04-03 22:40:08 +00:00
|
|
|
- // MIR for `foo` before SimplifyLocals
|
|
|
|
+ // MIR for `foo` after SimplifyLocals
|
|
|
|
|
|
|
|
fn foo() -> () {
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/simplify-locals-fixedpoint.rs:3:13: 3:13
|
|
|
|
let mut _1: (std::option::Option<u8>, std::option::Option<T>); // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69
|
|
|
|
let mut _2: std::option::Option<u8>; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49
|
|
|
|
let mut _3: std::option::Option<T>; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68
|
|
|
|
let mut _4: isize; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
|
|
|
|
let mut _5: isize; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
|
|
|
|
let _6: u8; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
|
2021-08-15 17:25:17 +00:00
|
|
|
let mut _7: bool; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
|
|
|
|
let mut _8: u8; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
|
2020-04-03 22:40:08 +00:00
|
|
|
scope 1 {
|
|
|
|
debug a => _6; // in scope 1 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-04-25 09:01:43 +00:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49
|
|
|
|
discriminant(_2) = 0; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49
|
|
|
|
StorageLive(_3); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68
|
|
|
|
discriminant(_3) = 0; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68
|
|
|
|
(_1.0: std::option::Option<u8>) = move _2; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69
|
|
|
|
(_1.1: std::option::Option<T>) = move _3; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69
|
|
|
|
StorageDead(_3); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69
|
|
|
|
_5 = discriminant((_1.0: std::option::Option<u8>)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
|
2021-08-15 17:25:17 +00:00
|
|
|
switchInt(move _5) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
|
2020-04-03 22:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2021-08-15 17:25:17 +00:00
|
|
|
_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
|
2021-03-22 22:30:56 +00:00
|
|
|
}
|
|
|
|
|
2021-03-23 16:24:28 +00:00
|
|
|
bb2: {
|
2021-08-15 17:25:17 +00:00
|
|
|
_4 = discriminant((_1.1: std::option::Option<T>)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
|
|
|
|
switchInt(move _4) -> [0_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2020-04-25 09:01:43 +00:00
|
|
|
StorageLive(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
|
|
|
|
_6 = (((_1.0: std::option::Option<u8>) as Some).0: u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
|
2021-08-15 17:25:17 +00:00
|
|
|
StorageLive(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
|
|
|
|
StorageLive(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
|
|
|
|
_8 = _6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
|
|
|
|
_7 = Gt(move _8, const 42_u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
|
|
|
|
StorageDead(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:19: 5:20
|
|
|
|
switchInt(move _7) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
|
2020-04-03 23:31:59 +00:00
|
|
|
}
|
|
|
|
|
2021-08-15 17:25:17 +00:00
|
|
|
bb4: {
|
|
|
|
_0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
|
|
|
|
goto -> bb6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
|
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
|
|
|
_0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
|
|
|
|
goto -> bb6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
|
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
|
|
|
StorageDead(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:7:9: 7:10
|
|
|
|
goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6
|
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2021-08-08 14:49:13 +00:00
|
|
|
StorageDead(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6
|
2021-08-15 17:25:17 +00:00
|
|
|
drop(_1) -> bb8; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2
|
2020-04-03 23:31:59 +00:00
|
|
|
}
|
|
|
|
|
2021-08-15 17:25:17 +00:00
|
|
|
bb8: {
|
2020-04-25 09:01:43 +00:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2
|
|
|
|
return; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:2: 9:2
|
2020-04-03 22:40:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|