summaryrefslogtreecommitdiffstats
path: root/vendor/gsgdt/tests/graph2.json
blob: 3ca1cac2e48b5d4ab636ae41b1b6d619b84ed5fe (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
{
  "name": "Mir_0_3",
  "kind": "Digraph",
  "nodes": [
    {
      "label": "bb0",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb0",
      "stmts": [
        "StorageLive(_1)",
        "_1 = Vec::<i32>::new()"
      ]
    },
    {
      "label": "bb1",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb1",
      "stmts": [
        "resume"
      ]
    },
    {
      "label": "bb2",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb2",
      "stmts": [
        "StorageLive(_2)", "StorageLive(_3)", "(_3.0: i32) = const 1_i32", "(_3.1: i32) = const 10_i32",
        "_2 = <std::ops::Range<i32> as IntoIterator>::into_iter(move _3)"
      ]
    },
    {
      "label": "bb3",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb3",
      "stmts": [
        "StorageDead(_3)", "StorageLive(_4)", "_4 = move _2",
        "goto"
      ]
    },
    {
      "label": "bb4",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb4",
      "stmts": [
        "drop(_1)"
      ]
    },
    {
      "label": "bb5",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb5",
      "stmts": [
        "StorageLive(_5)", "StorageLive(_6)", "StorageLive(_7)", "StorageLive(_8)", "_8 = &mut _4", "_7 = &mut (*_8)",
        "_6 = <std::ops::Range<i32> as Iterator>::next(move _7)"
      ]
    },
    {
      "label": "bb6",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb6",
      "stmts": [
        "StorageDead(_7)", "_9 = discriminant(_6)",
        "switchInt(move _9)"
      ]
    },
    {
      "label": "bb7",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb7",
      "stmts": [
        "_0 = const ()", "StorageDead(_8)", "StorageDead(_6)", "StorageDead(_5)", "StorageDead(_4)", "StorageDead(_2)",
        "drop(_1)"
      ]
    },
    {
      "label": "bb8",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb8",
      "stmts": [
        "unreachable"
      ]
    },
    {
      "label": "bb9",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb9",
      "stmts": [
        "StorageLive(_10)", "_10 = ((_6 as Some).0: i32)", "StorageLive(_11)", "_11 = _10", "_5 = move _11", "StorageDead(_11)", "StorageDead(_10)", "StorageDead(_8)", "StorageDead(_6)", "StorageLive(_12)", "_12 = _5", "StorageLive(_13)", "StorageLive(_14)", "_14 = _12", "_15 = const false", "_16 = Eq(_14, const i32::MIN)", "_17 = BitAnd(move _15, move _16)",
        "assert(!move _17, \"attempt to compute the remainder of `{} % {}` which would overflow\", _14, const 3_i32)"
      ]
    },
    {
      "label": "bb10",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb10",
      "stmts": [
        "_13 = Rem(move _14, const 3_i32)", "StorageDead(_14)",
        "switchInt(move _13)"
      ]
    },
    {
      "label": "bb11",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb11",
      "stmts": [
        "StorageDead(_13)",
        "goto"
      ]
    },
    {
      "label": "bb12",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb12",
      "stmts": [
        "StorageDead(_13)", "StorageLive(_18)", "StorageLive(_19)", "_19 = &mut _1", "StorageLive(_20)", "_20 = _12",
        "_18 = Vec::<i32>::push(move _19, move _20)"
      ]
    },
    {
      "label": "bb13",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb13",
      "stmts": [
        "StorageDead(_20)", "StorageDead(_19)", "StorageDead(_18)",
        "goto"
      ]
    },
    {
      "label": "bb14",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb14",
      "stmts": [
        "StorageDead(_12)", "StorageDead(_5)",
        "goto"
      ]
    },
    {
      "label": "bb15",
      "style": {
        "title_bg": null,
        "last_stmt_sep": false
      },
      "title": "bb15",
      "stmts": [
        "StorageDead(_1)",
        "return"
      ]
    }
  ],
  "edges": [
    {
      "from": "bb0",
      "to": "bb2",
      "label": "return"
    },
    {
      "from": "bb2",
      "to": "bb3",
      "label": "return"
    },
    {
      "from": "bb2",
      "to": "bb4",
      "label": "unwind"
    },
    {
      "from": "bb3",
      "to": "bb5",
      "label": ""
    },
    {
      "from": "bb4",
      "to": "bb1",
      "label": "return"
    },
    {
      "from": "bb5",
      "to": "bb6",
      "label": "return"
    },
    {
      "from": "bb5",
      "to": "bb4",
      "label": "unwind"
    },
    {
      "from": "bb6",
      "to": "bb7",
      "label": "0_isize"
    },
    {
      "from": "bb6",
      "to": "bb9",
      "label": "1_isize"
    },
    {
      "from": "bb6",
      "to": "bb8",
      "label": "otherwise"
    },
    {
      "from": "bb7",
      "to": "bb15",
      "label": "return"
    },
    {
      "from": "bb9",
      "to": "bb10",
      "label": "success"
    },
    {
      "from": "bb9",
      "to": "bb4",
      "label": "unwind"
    },
    {
      "from": "bb10",
      "to": "bb12",
      "label": "0_i32"
    },
    {
      "from": "bb10",
      "to": "bb11",
      "label": "otherwise"
    },
    {
      "from": "bb11",
      "to": "bb14",
      "label": ""
    },
    {
      "from": "bb12",
      "to": "bb13",
      "label": "return"
    },
    {
      "from": "bb12",
      "to": "bb4",
      "label": "unwind"
    },
    {
      "from": "bb13",
      "to": "bb14",
      "label": ""
    },
    {
      "from": "bb14",
      "to": "bb5",
      "label": ""
    }
  ]
}