rust/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff

39 lines
2.4 KiB
Diff
Raw Normal View History

2020-04-04 12:15:01 -05:00
- // MIR for `main` before ConstProp
+ // MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/reify_fn_ptr.rs:3:11: 3:11
let mut _1: *const fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
let mut _2: usize; // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
let mut _3: fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
scope 1 {
}
bb0: {
StorageLive(_1); // bb0[0]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
StorageLive(_2); // bb0[1]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
StorageLive(_3); // bb0[2]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
_3 = const main as fn() (Pointer(ReifyFnPointer)); // bb0[3]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
// ty::Const
// + ty: fn() {main}
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
// + literal: Const { ty: fn() {main}, val: Value(Scalar(<ZST>)) }
_2 = move _3 as usize (Misc); // bb0[4]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
StorageDead(_3); // bb0[5]: scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26
_1 = move _2 as *const fn() (Misc); // bb0[6]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
StorageDead(_2); // bb0[7]: scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41
StorageDead(_1); // bb0[8]: scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42
2020-04-09 05:58:36 -05:00
_0 = const (); // bb0[9]: scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2
// ty::Const
// + ty: ()
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $DIR/reify_fn_ptr.rs:3:11: 5:2
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
2020-04-04 12:15:01 -05:00
return; // bb0[10]: scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2
}
}