fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.8 KiB191 linesraw
1- // MIR for `dereferences` before GVN
2+ // MIR for `dereferences` after GVN
3  
4  fn dereferences(_1: &mut u32, _2: &impl Copy, _3: &S<u32>) -> () {
5      debug t => _1;
6      debug u => _2;
7      debug s => _3;
8      let mut _0: ();
9      let _4: ();
10      let mut _5: u32;
11      let _6: ();
12      let mut _7: u32;
13      let _8: *const u32;
14      let _9: ();
15      let mut _10: u32;
16      let _11: ();
17      let mut _12: u32;
18      let _14: ();
19      let mut _15: u32;
20      let _16: ();
21      let mut _17: u32;
22      let _19: ();
23      let mut _20: u32;
24      let _21: ();
25      let mut _22: u32;
26      let _23: ();
27      let mut _24: &u32;
28      let _25: ();
29      let mut _26: impl Copy;
30      let _27: ();
31      let mut _28: impl Copy;
32      let _29: ();
33      let mut _30: u32;
34      let _31: ();
35      let mut _32: u32;
36      scope 1 {
37          debug z => _8;
38          let _13: *mut u32;
39          scope 2 {
40          }
41          scope 3 {
42          }
43          scope 4 {
44              debug z => _13;
45              let _18: &u32;
46              scope 5 {
47              }
48              scope 6 {
49              }
50              scope 7 {
51                  debug z => _18;
52              }
53          }
54      }
55  
56      bb0: {
57          StorageLive(_4);
58          StorageLive(_5);
59          _5 = (*_1);
60          _4 = opaque::<u32>(move _5) -> [return: bb1, unwind unreachable];
61      }
62  
63      bb1: {
64          StorageDead(_5);
65          StorageDead(_4);
66          StorageLive(_6);
67          StorageLive(_7);
68          _7 = (*_1);
69          _6 = opaque::<u32>(move _7) -> [return: bb2, unwind unreachable];
70      }
71  
72      bb2: {
73          StorageDead(_7);
74          StorageDead(_6);
75          StorageLive(_8);
76          _8 = &raw const (*_1);
77          StorageLive(_9);
78          StorageLive(_10);
79          _10 = (*_8);
80          _9 = opaque::<u32>(move _10) -> [return: bb3, unwind unreachable];
81      }
82  
83      bb3: {
84          StorageDead(_10);
85          StorageDead(_9);
86          StorageLive(_11);
87          StorageLive(_12);
88          _12 = (*_8);
89          _11 = opaque::<u32>(move _12) -> [return: bb4, unwind unreachable];
90      }
91  
92      bb4: {
93          StorageDead(_12);
94          StorageDead(_11);
95          StorageLive(_13);
96          _13 = &raw mut (*_1);
97          StorageLive(_14);
98          StorageLive(_15);
99          _15 = (*_13);
100          _14 = opaque::<u32>(move _15) -> [return: bb5, unwind unreachable];
101      }
102  
103      bb5: {
104          StorageDead(_15);
105          StorageDead(_14);
106          StorageLive(_16);
107          StorageLive(_17);
108          _17 = (*_13);
109          _16 = opaque::<u32>(move _17) -> [return: bb6, unwind unreachable];
110      }
111  
112      bb6: {
113          StorageDead(_17);
114          StorageDead(_16);
115          StorageLive(_18);
116          _18 = &(*_1);
117          StorageLive(_19);
118-         StorageLive(_20);
119          _20 = (*_18);
120-         _19 = opaque::<u32>(move _20) -> [return: bb7, unwind unreachable];
121+         _19 = opaque::<u32>(_20) -> [return: bb7, unwind unreachable];
122      }
123  
124      bb7: {
125-         StorageDead(_20);
126          StorageDead(_19);
127          StorageLive(_21);
128-         StorageLive(_22);
129-         _22 = (*_18);
130-         _21 = opaque::<u32>(move _22) -> [return: bb8, unwind unreachable];
131+         _21 = opaque::<u32>(_20) -> [return: bb8, unwind unreachable];
132      }
133  
134      bb8: {
135-         StorageDead(_22);
136          StorageDead(_21);
137          StorageLive(_23);
138          StorageLive(_24);
139          _24 = &(*_18);
140          _23 = opaque::<&u32>(move _24) -> [return: bb9, unwind unreachable];
141      }
142  
143      bb9: {
144          StorageDead(_24);
145          StorageDead(_23);
146          StorageLive(_25);
147          StorageLive(_26);
148          _26 = (*_2);
149          _25 = opaque::<impl Copy>(move _26) -> [return: bb10, unwind unreachable];
150      }
151  
152      bb10: {
153          StorageDead(_26);
154          StorageDead(_25);
155          StorageLive(_27);
156          StorageLive(_28);
157          _28 = (*_2);
158          _27 = opaque::<impl Copy>(move _28) -> [return: bb11, unwind unreachable];
159      }
160  
161      bb11: {
162          StorageDead(_28);
163          StorageDead(_27);
164          StorageLive(_29);
165-         StorageLive(_30);
166          _30 = ((*_3).0: u32);
167-         _29 = opaque::<u32>(move _30) -> [return: bb12, unwind unreachable];
168+         _29 = opaque::<u32>(_30) -> [return: bb12, unwind unreachable];
169      }
170  
171      bb12: {
172-         StorageDead(_30);
173          StorageDead(_29);
174          StorageLive(_31);
175-         StorageLive(_32);
176-         _32 = ((*_3).0: u32);
177-         _31 = opaque::<u32>(move _32) -> [return: bb13, unwind unreachable];
178+         _31 = opaque::<u32>(_30) -> [return: bb13, unwind unreachable];
179      }
180  
181      bb13: {
182-         StorageDead(_32);
183          StorageDead(_31);
184          _0 = const ();
185          StorageDead(_18);
186          StorageDead(_13);
187          StorageDead(_8);
188          return;
189      }
190  }
191