Commit b5d2ff5
authored
Cranelift: update regalloc2 to 0.15.0 to permit more VRegs. (#12611)
* Cranelift: update regalloc2 to 0.15.0 to permit more VRegs.
This pulls in bytecodealliance/regalloc2#257 to permit more VRegs to
be used in a single function body, addressing #12229 and our followup
discussions about supporting function body sizes up to the Wasm
implementation limit standard.
In addition to the RA2 upgrade, this also includes a bit more explicit
limit-checking on the Cranelift side: note that we don't directly use
`regalloc2::VReg` but instead we further bitpack it into `Reg`, which
is logically a sum type of `VReg`, `PReg` and `SpillSlot` (the last
one needed to represent stack allocation locations on defs, e.g. on
callsites with many returns). `PReg`s are packed into the beginning of
the `VReg` index space but `SpillSlot`s are distinguished by stealing
the upper bit of a `u32`. This was previously not a problem given the
smaller `VReg` index space but now we need to check explicitly; hence
`Reg::from_virtual_reg_checked` and its use in the lowering vreg
allocator. Because the `VReg` index packs the class into the bottom
two bits, and index into the upper 30, but we steal one bit at the
top, the true limit for VReg count is thus actually 2^29, or
512M.
Fixes #12229.
* Drop `code_too_large` test.1 parent e581aa8 commit b5d2ff5
7 files changed
Lines changed: 36 additions & 80 deletions
File tree
- cranelift/codegen/src/machinst
- supply-chain
- tests/all
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | | - | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
1784 | 1787 | | |
1785 | 1788 | | |
1786 | 1789 | | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1787 | 1797 | | |
1788 | | - | |
1789 | | - | |
| 1798 | + | |
| 1799 | + | |
1790 | 1800 | | |
1791 | 1801 | | |
1792 | 1802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | | - | |
1116 | | - | |
| 1115 | + | |
| 1116 | + | |
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
0 commit comments