summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff
blob: a8dd91efc379f86fef4c776c80d2a693f00d806a (plain)
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
- // MIR for `main` before RemoveStorageMarkers
+ // MIR for `main` after RemoveStorageMarkers
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/remove_storage_markers.rs:+0:11: +0:11
      let mut _1: i32;                     // in scope 0 at $DIR/remove_storage_markers.rs:+1:9: +1:16
      let mut _2: std::ops::Range<i32>;    // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _3: std::ops::Range<i32>;    // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _5: ();                      // in scope 0 at $DIR/remove_storage_markers.rs:+0:1: +5:2
      let _6: ();                          // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _7: std::option::Option<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _8: &mut std::ops::Range<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _9: &mut std::ops::Range<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      let mut _10: isize;                  // in scope 0 at $DIR/remove_storage_markers.rs:+2:5: +4:6
      let mut _11: !;                      // in scope 0 at $DIR/remove_storage_markers.rs:+2:5: +4:6
      let mut _13: i32;                    // in scope 0 at $DIR/remove_storage_markers.rs:+3:16: +3:17
      scope 1 {
          debug sum => _1;                 // in scope 1 at $DIR/remove_storage_markers.rs:+1:9: +1:16
          let mut _4: std::ops::Range<i32>; // in scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          scope 2 {
              debug iter => _4;            // in scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
              let _12: i32;                // in scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
              scope 3 {
                  debug i => _12;          // in scope 3 at $DIR/remove_storage_markers.rs:+2:9: +2:10
              }
          }
      }
  
      bb0: {
-         StorageLive(_1);                 // scope 0 at $DIR/remove_storage_markers.rs:+1:9: +1:16
          _1 = const 0_i32;                // scope 0 at $DIR/remove_storage_markers.rs:+1:19: +1:20
-         StorageLive(_2);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
-         StorageLive(_3);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _3 = std::ops::Range::<i32> { start: const 0_i32, end: const 10_i32 }; // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _2 = <std::ops::Range<i32> as IntoIterator>::into_iter(move _3) -> bb1; // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
                                           // mir::Constant
                                           // + span: $DIR/remove_storage_markers.rs:10:14: 10:19
                                           // + literal: Const { ty: fn(std::ops::Range<i32>) -> <std::ops::Range<i32> as IntoIterator>::IntoIter {<std::ops::Range<i32> as IntoIterator>::into_iter}, val: Value(<ZST>) }
      }
  
      bb1: {
-         StorageDead(_3);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:18: +2:19
-         StorageLive(_4);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _4 = move _2;                    // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          goto -> bb2;                     // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
      }
  
      bb2: {
-         StorageLive(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
-         StorageLive(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
-         StorageLive(_8);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
-         StorageLive(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _9 = &mut _4;                    // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _8 = &mut (*_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          _7 = <std::ops::Range<i32> as Iterator>::next(move _8) -> bb3; // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
                                           // mir::Constant
                                           // + span: $DIR/remove_storage_markers.rs:10:14: 10:19
                                           // + literal: Const { ty: for<'a> fn(&'a mut std::ops::Range<i32>) -> Option<<std::ops::Range<i32> as Iterator>::Item> {<std::ops::Range<i32> as Iterator>::next}, val: Value(<ZST>) }
      }
  
      bb3: {
-         StorageDead(_8);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:18: +2:19
          _10 = discriminant(_7);          // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
          switchInt(move _10) -> [0: bb6, 1: bb4, otherwise: bb5]; // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      }
  
      bb4: {
-         StorageLive(_12);                // scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
          _12 = ((_7 as Some).0: i32);     // scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
-         StorageLive(_13);                // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
          _13 = _12;                       // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
          _1 = Add(_1, move _13);          // scope 3 at $DIR/remove_storage_markers.rs:+3:9: +3:17
-         StorageDead(_13);                // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
          _6 = const ();                   // scope 3 at $DIR/remove_storage_markers.rs:+2:20: +4:6
-         StorageDead(_12);                // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
          _5 = const ();                   // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
          goto -> bb2;                     // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
      }
  
      bb5: {
          unreachable;                     // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
      }
  
      bb6: {
          _0 = const ();                   // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
-         StorageDead(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_4);                 // scope 1 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_2);                 // scope 1 at $DIR/remove_storage_markers.rs:+4:5: +4:6
-         StorageDead(_1);                 // scope 0 at $DIR/remove_storage_markers.rs:+5:1: +5:2
          return;                          // scope 0 at $DIR/remove_storage_markers.rs:+5:2: +5:2
      }
  }