File: gvn_copy_aggregate.remove_storage_dead.GVN.diff

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (54 lines) | stat: -rw-r--r-- 1,331 bytes parent folder | download | duplicates (3)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
- // MIR for `remove_storage_dead` before GVN
+ // MIR for `remove_storage_dead` after GVN
  
  fn remove_storage_dead(_1: fn() -> AlwaysSome<T>) -> AlwaysSome<T> {
      debug f => _1;
      let mut _0: AlwaysSome<T>;
      let _2: T;
      let mut _3: AlwaysSome<T>;
      let mut _4: fn() -> AlwaysSome<T>;
      let _5: T;
      let mut _6: T;
      let mut _7: isize;
      let mut _8: isize;
      scope 1 {
          debug v => _2;
      }
      scope 2 {
          debug v => _5;
      }
  
      bb0: {
          StorageLive(_2);
-         StorageLive(_3);
+         nop;
          StorageLive(_4);
          _4 = copy _1;
-         _3 = move _4() -> [return: bb1, unwind unreachable];
+         _3 = copy _1() -> [return: bb1, unwind unreachable];
      }
  
      bb1: {
          StorageDead(_4);
-         StorageLive(_5);
-         _5 = move ((_3 as Some).0: T);
-         _2 = move _5;
-         StorageDead(_5);
+         nop;
+         _5 = copy ((_3 as Some).0: T);
+         _2 = copy _5;
+         nop;
          _7 = discriminant(_3);
-         StorageDead(_3);
+         nop;
          StorageLive(_6);
-         _6 = move _2;
-         _0 = AlwaysSome::<T>::Some(move _6);
+         _6 = copy _5;
+         _0 = copy _3;
          StorageDead(_6);
          StorageDead(_2);
          return;
      }
  }