Commit fa25cd6
authored
Do not recollect types in ReorderTypes (#8195)
ReorderTypes previously collected the module types and their counts,
even though it already extends GlobalTypeRewriter, which also collects
the module types in its constructor. Not only did this duplicate work,
it was also a subtle source of bugs because ReorderTypes and
GlobalTypeRewriter collected types slightly differently. ReorderTypes
collected the binary types and GlobalTypeRewriter collected the used IR
types. This could result in different types being collected for the same
multivalue control flow signatures, causing an assertion failure when
a type was seemingly missing from the collected info.
Fix the problem and make the pass more efficient by simply not
collecting the types two separate times.1 parent 1a51861 commit fa25cd6
File tree
2 files changed
+28
-11
lines changed- src/passes
- test/lit/passes
2 files changed
+28
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| |||
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | | - | |
49 | | - | |
| 44 | + | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 149 | + | |
158 | 150 | | |
159 | 151 | | |
160 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
0 commit comments