File: gvn.fn_pointers.GVN.panic-unwind.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 (118 lines) | stat: -rw-r--r-- 3,777 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
- // MIR for `fn_pointers` before GVN
+ // MIR for `fn_pointers` after GVN
  
  fn fn_pointers() -> () {
      let mut _0: ();
      let _1: fn(u8) -> u8;
      let _2: ();
      let mut _3: fn(u8) -> u8;
      let _5: ();
      let mut _6: fn(u8) -> u8;
      let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
      let _10: ();
      let mut _11: fn();
      let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
      let _14: ();
      let mut _15: fn();
      scope 1 {
          debug f => _1;
          let _4: fn(u8) -> u8;
          scope 2 {
              debug g => _4;
              let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
              scope 3 {
                  debug closure => _7;
                  let _8: fn();
                  scope 4 {
                      debug cf => _8;
                      let _12: fn();
                      scope 5 {
                          debug cg => _12;
                      }
                  }
              }
          }
      }
  
      bb0: {
-         StorageLive(_1);
+         nop;
          _1 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer, AsCast));
          StorageLive(_2);
          StorageLive(_3);
          _3 = copy _1;
-         _2 = opaque::<fn(u8) -> u8>(move _3) -> [return: bb1, unwind continue];
+         _2 = opaque::<fn(u8) -> u8>(copy _1) -> [return: bb1, unwind continue];
      }
  
      bb1: {
          StorageDead(_3);
          StorageDead(_2);
-         StorageLive(_4);
+         nop;
          _4 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer, AsCast));
          StorageLive(_5);
          StorageLive(_6);
          _6 = copy _4;
-         _5 = opaque::<fn(u8) -> u8>(move _6) -> [return: bb2, unwind continue];
+         _5 = opaque::<fn(u8) -> u8>(copy _4) -> [return: bb2, unwind continue];
      }
  
      bb2: {
          StorageDead(_6);
          StorageDead(_5);
-         StorageLive(_7);
-         _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
-         StorageLive(_8);
+         nop;
+         _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+         nop;
          StorageLive(_9);
-         _9 = copy _7;
-         _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
+         _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+         _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
          StorageDead(_9);
          StorageLive(_10);
          StorageLive(_11);
          _11 = copy _8;
-         _10 = opaque::<fn()>(move _11) -> [return: bb3, unwind continue];
+         _10 = opaque::<fn()>(copy _8) -> [return: bb3, unwind continue];
      }
  
      bb3: {
          StorageDead(_11);
          StorageDead(_10);
-         StorageLive(_12);
+         nop;
          StorageLive(_13);
-         _13 = copy _7;
-         _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
+         _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
+         _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
          StorageDead(_13);
          StorageLive(_14);
          StorageLive(_15);
          _15 = copy _12;
-         _14 = opaque::<fn()>(move _15) -> [return: bb4, unwind continue];
+         _14 = opaque::<fn()>(copy _12) -> [return: bb4, unwind continue];
      }
  
      bb4: {
          StorageDead(_15);
          StorageDead(_14);
          _0 = const ();
-         StorageDead(_12);
-         StorageDead(_8);
-         StorageDead(_7);
-         StorageDead(_4);
-         StorageDead(_1);
+         nop;
+         nop;
+         nop;
+         nop;
+         nop;
          return;
      }
  }