blob: 9854beaeb217cfb35da56d25182f6d2b90383c64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
- // MIR for `main` before DataflowConstProp
+ // MIR for `main` after DataflowConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/terminator.rs:+0:11: +0:11
let _1: i32; // in scope 0 at $DIR/terminator.rs:+1:9: +1:10
let _2: (); // in scope 0 at $DIR/terminator.rs:+3:5: +3:15
let mut _3: i32; // in scope 0 at $DIR/terminator.rs:+3:9: +3:14
let mut _4: i32; // in scope 0 at $DIR/terminator.rs:+3:9: +3:10
scope 1 {
debug a => _1; // in scope 1 at $DIR/terminator.rs:+1:9: +1:10
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/terminator.rs:+1:9: +1:10
_1 = const 1_i32; // scope 0 at $DIR/terminator.rs:+1:13: +1:14
StorageLive(_2); // scope 1 at $DIR/terminator.rs:+3:5: +3:15
StorageLive(_3); // scope 1 at $DIR/terminator.rs:+3:9: +3:14
StorageLive(_4); // scope 1 at $DIR/terminator.rs:+3:9: +3:10
- _4 = _1; // scope 1 at $DIR/terminator.rs:+3:9: +3:10
- _3 = Add(move _4, const 1_i32); // scope 1 at $DIR/terminator.rs:+3:9: +3:14
+ _4 = const 1_i32; // scope 1 at $DIR/terminator.rs:+3:9: +3:10
+ _3 = const 2_i32; // scope 1 at $DIR/terminator.rs:+3:9: +3:14
StorageDead(_4); // scope 1 at $DIR/terminator.rs:+3:13: +3:14
- _2 = foo(move _3) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
+ _2 = foo(const 2_i32) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
// mir::Constant
// + span: $DIR/terminator.rs:10:5: 10:8
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
}
bb1: {
StorageDead(_3); // scope 1 at $DIR/terminator.rs:+3:14: +3:15
StorageDead(_2); // scope 1 at $DIR/terminator.rs:+3:15: +3:16
_0 = const (); // scope 0 at $DIR/terminator.rs:+0:11: +4:2
StorageDead(_1); // scope 0 at $DIR/terminator.rs:+4:1: +4:2
return; // scope 0 at $DIR/terminator.rs:+4:2: +4:2
}
}
|