fitzgen opened PR #13912 from fitzgen:reuse-regalloc2-ctx to bytecodealliance:main:
Store the
regalloc2::Ctxincranelift_codegen::Contextand thread it throughTargetIsa::compile_functiondown toregalloc2::run_with_ctx, instead of lettingregalloc2::runallocate a freshCtxper function. Theregalloc2::Ctxis then reused automatically as thecranelift_codegen::Contextis reused by Wasmtime (which pools them across compilation threads).
fitzgen requested wasmtime-compiler-s390x-reviewers for a review on PR #13912.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #13912.
fitzgen requested cfallin for a review on PR #13912.
fitzgen requested alexcrichton for a review on PR #13912.
fitzgen requested wasmtime-default-reviewers for a review on PR #13912.
fitzgen updated PR #13912.
fitzgen updated PR #13912.
:thumbs_up: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
This
outputhas a fair number ofVecs and such in it which would probably benefit from reuse as well -- could the API be changed here to leave theoutputin-place?
github-actions[bot] added the label cranelift:area:machinst on PR #13912.
github-actions[bot] added the label cranelift on PR #13912.
github-actions[bot] added the label cranelift:area:aarch64 on PR #13912.
github-actions[bot] added the label cranelift:area:x64 on PR #13912.
:memo: fitzgen submitted PR review.
:speech_balloon: fitzgen created PR review comment:
I'll look into this in a follow up
fitzgen added PR #13912 Cranelift: reuse the regalloc2::Ctx across function compilations to the merge queue.
:thumbs_up: cfallin submitted PR review.
github-merge-queue[bot] removed PR #13912 Cranelift: reuse the regalloc2::Ctx across function compilations from the merge queue.
fitzgen added PR #13912 Cranelift: reuse the regalloc2::Ctx across function compilations to the merge queue.
:check: fitzgen merged PR #13912.
fitzgen removed PR #13912 Cranelift: reuse the regalloc2::Ctx across function compilations from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC