rust/tests/mir-opt/building/match_false_edges.main.built.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

176 lines
9.7 KiB
Rust
Raw Normal View History

// MIR for `main` after built
2020-04-02 16:09:01 -05:00
fn main() -> () {
2022-07-27 13:47:42 -05:00
let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:11: +0:11
let mut _1: i32; // in scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
let mut _4: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
let mut _5: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
let _6: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
let _7: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
let mut _8: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
let _9: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
let _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
let _11: &i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
let mut _12: bool; // in scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
let mut _13: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
let _14: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
2020-04-02 16:09:01 -05:00
scope 1 {
}
scope 2 {
2022-07-27 13:47:42 -05:00
debug _w => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
debug _w => _7; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
2020-04-02 16:09:01 -05:00
}
scope 3 {
2022-07-27 13:47:42 -05:00
debug _x => _9; // in scope 3 at $DIR/match_false_edges.rs:+3:9: +3:11
2020-04-02 16:09:01 -05:00
}
scope 4 {
2022-07-27 13:47:42 -05:00
debug y => _10; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
debug y => _11; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
2020-04-02 16:09:01 -05:00
}
scope 5 {
2022-07-27 13:47:42 -05:00
debug _z => _14; // in scope 5 at $DIR/match_false_edges.rs:+5:9: +5:11
2020-04-02 16:09:01 -05:00
}
bb0: {
2022-07-27 13:47:42 -05:00
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
_2 = Option::<i32>::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
_4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
switchInt(move _4) -> [1: bb2, otherwise: bb1]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
falseEdge -> [real: bb13, imaginary: bb6]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
2020-04-02 16:09:01 -05:00
}
bb2: {
falseEdge -> [real: bb8, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
2020-04-02 16:09:01 -05:00
}
bb3: {
goto -> bb1; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
}
bb4: {
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
switchInt(move _3) -> [1: bb6, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
}
bb5: {
2022-07-27 13:47:42 -05:00
StorageLive(_14); // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
_14 = _2; // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
_1 = const 4_i32; // scope 5 at $DIR/match_false_edges.rs:+5:15: +5:16
StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
2020-04-02 16:09:01 -05:00
}
bb6: {
falseEdge -> [real: bb14, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
2020-04-02 16:09:01 -05:00
}
bb7: {
goto -> bb5; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
}
bb8: {
2022-07-27 13:47:42 -05:00
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_7 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
StorageLive(_8); // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
_8 = guard() -> [return: bb9, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
2020-04-02 16:09:01 -05:00
// mir::Constant
2022-04-01 12:13:25 -05:00
// + span: $DIR/match_false_edges.rs:34:21: 34:26
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
bb9: {
switchInt(move _8) -> [0: bb11, otherwise: bb10]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
2020-04-02 16:09:01 -05:00
}
bb10: {
2022-07-27 13:47:42 -05:00
StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
FakeRead(ForGuardBinding, _7); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_6 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_1 = const 1_i32; // scope 2 at $DIR/match_false_edges.rs:+2:32: +2:33
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
2020-04-02 16:09:01 -05:00
}
bb11: {
goto -> bb12; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
}
bb12: {
2022-07-27 13:47:42 -05:00
StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
2020-04-02 16:09:01 -05:00
}
bb13: {
2022-07-27 13:47:42 -05:00
StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
_9 = _2; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
_1 = const 2_i32; // scope 3 at $DIR/match_false_edges.rs:+3:15: +3:16
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
2020-04-02 16:09:01 -05:00
}
bb14: {
2022-07-27 13:47:42 -05:00
StorageLive(_11); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_11 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
StorageLive(_12); // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
StorageLive(_13); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
_13 = (*_11); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
_12 = guard2(move _13) -> [return: bb15, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
2020-04-02 16:09:01 -05:00
// mir::Constant
2022-04-01 12:13:25 -05:00
// + span: $DIR/match_false_edges.rs:36:20: 36:26
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
bb15: {
switchInt(move _12) -> [0: bb17, otherwise: bb16]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
2020-04-02 16:09:01 -05:00
}
bb16: {
2022-07-27 13:47:42 -05:00
StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
FakeRead(ForGuardBinding, _11); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_10 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_1 = const 3_i32; // scope 4 at $DIR/match_false_edges.rs:+4:33: +4:34
StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
2020-04-02 16:09:01 -05:00
}
bb17: {
goto -> bb18; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
}
bb18: {
2022-07-27 13:47:42 -05:00
StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
falseEdge -> [real: bb7, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
2020-04-02 16:09:01 -05:00
}
bb19: {
PlaceMention(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
2022-07-27 13:47:42 -05:00
StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
_0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:11: +7:2
return; // scope 0 at $DIR/match_false_edges.rs:+7:2: +7:2
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb20 (cleanup): {
2022-07-27 13:47:42 -05:00
resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +7:2
2020-10-02 15:11:24 -05:00
}
2020-04-02 16:09:01 -05:00
}