]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/derefer_inline_test.main.Derefer.diff
Auto merge of #96978 - lqd:win_pgo2, r=Mark-Simulacrum
[rust.git] / src / test / mir-opt / derefer_inline_test.main.Derefer.diff
1 - // MIR for `main` before Derefer
2 + // MIR for `main` after Derefer
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/derefer_inline_test.rs:9:11: 9:11
6       let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
7       let mut _2: usize;                   // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
8       let mut _3: usize;                   // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
9       let mut _4: *mut u8;                 // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
10       let mut _5: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
11       let mut _6: ();                      // in scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
12       scope 1 {
13       }
14   
15       bb0: {
16           StorageLive(_1);                 // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
17           _2 = SizeOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
18           _3 = AlignOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
19           _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
20                                            // mir::Constant
21                                            // + span: $DIR/derefer_inline_test.rs:10:5: 10:12
22                                            // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
23       }
24   
25       bb1: {
26           StorageLive(_5);                 // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
27           _5 = ShallowInitBox(move _4, std::boxed::Box<u32>); // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
28           (*_5) = f() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:10:9: 10:12
29                                            // mir::Constant
30                                            // + span: $DIR/derefer_inline_test.rs:10:9: 10:10
31                                            // + literal: Const { ty: fn() -> Box<u32> {f}, val: Value(<ZST>) }
32       }
33   
34       bb2: {
35           _1 = move _5;                    // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
36           goto -> bb3;                     // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
37       }
38   
39       bb3: {
40           StorageDead(_5);                 // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
41           drop(_1) -> [return: bb4, unwind: bb6]; // scope 0 at $DIR/derefer_inline_test.rs:10:12: 10:13
42       }
43   
44       bb4: {
45           StorageDead(_1);                 // scope 0 at $DIR/derefer_inline_test.rs:10:12: 10:13
46           _0 = const ();                   // scope 0 at $DIR/derefer_inline_test.rs:9:11: 11:2
47           return;                          // scope 0 at $DIR/derefer_inline_test.rs:11:2: 11:2
48       }
49   
50       bb5 (cleanup): {
51           goto -> bb8;                     // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
52       }
53   
54       bb6 (cleanup): {
55           resume;                          // scope 0 at $DIR/derefer_inline_test.rs:9:1: 11:2
56       }
57   
58       bb7 (cleanup): {
59           _6 = alloc::alloc::box_free::<Box<u32>, std::alloc::Global>(move (_5.0: std::ptr::Unique<std::boxed::Box<u32>>), move (_5.1: std::alloc::Global)) -> bb6; // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
60                                            // mir::Constant
61                                            // + span: $DIR/derefer_inline_test.rs:10:11: 10:12
62                                            // + literal: Const { ty: unsafe fn(Unique<Box<u32>>, std::alloc::Global) {alloc::alloc::box_free::<Box<u32>, std::alloc::Global>}, val: Value(<ZST>) }
63       }
64   
65       bb8 (cleanup): {
66           goto -> bb7;                     // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
67       }
68   }
69