Stream: git-wasmtime

Topic: wasmtime / PR #12611 Cranelift: update regalloc2 to 0.15....


view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 22:26):

cfallin opened PR #12611 from cfallin:regalloc2-upgrade-vreg-bounds to bytecodealliance:main:

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). PRegs are packed into the beginning of the VReg index space but SpillSlots 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.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 22:26):

cfallin requested alexcrichton for a review on PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 22:26):

cfallin requested wasmtime-compiler-reviewers for a review on PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 22:26):

cfallin requested wasmtime-default-reviewers for a review on PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 22:33):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 23:22):

cfallin commented on PR #12611:

The failing test (code_too_large) fails as expected because we now support the generated function body size. A few thoughts though:

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2026 at 23:27):

alexcrichton commented on PR #12611:

I think that test already takes forever to compile/run in debug mode on all platforms so jettisoning that test doesn't seem unreasonable to me, and agreed it in theory should not be possible to write. Maybe it's sufficient to have a local script to run or some online corpus of "must compile big modules" or something like that?

Either that or we could create a dedicated test job for "compile wasmtime in release on one fast platform and compile big modules" to make sure everything succeeds.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:10):

cfallin requested fitzgen for a review on PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:10):

cfallin requested wasmtime-core-reviewers for a review on PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:10):

cfallin updated PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:10):

cfallin unassigned fitzgen from PR #12611 Cranelift: update regalloc2 to 0.15.0 to permit more VRegs..

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:11):

cfallin commented on PR #12611:

Sure thing -- I'll push the "corpus of big inputs to test" as followup (after #12613 lands as well); removed the code_too_large test here.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:11):

cfallin has enabled auto merge for PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 00:23):

cfallin added PR #12611 Cranelift: update regalloc2 to 0.15.0 to permit more VRegs. to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 01:04):

cfallin merged PR #12611.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2026 at 01:04):

cfallin removed PR #12611 Cranelift: update regalloc2 to 0.15.0 to permit more VRegs. from the merge queue


Last updated: Feb 24 2026 at 04:36 UTC