Skip to content

perf(compiler): reduce register allocation time on large EVM functions - #620

Open
abmcar wants to merge 2 commits into
DTVMStack:mainfrom
abmcar:perf/evm-keep-instance-pointer-in-register
Open

abmcar wants to merge 2 commits into
DTVMStack:mainfrom
abmcar:perf/evm-keep-instance-pointer-in-register

Conversation

@abmcar

@abmcar abmcar commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

src/compiler: the register coalescer, compileMIRToCgIR, and the EVM compiler.

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains CI/CD configuration changes
  • Contains documentation changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

Register allocation dominates compile time on large EVM contracts. Two commits:

  • The coalescer asks isHighCostLiveInterval before building its two JoinVals instead of after. Same decisions, same code.
  • The EVM compiler marks the live interval of the instance pointer, its functions' only parameter, unspillable before greedy allocation. It stays in one register instead of being split, spilled and revisited. This is an opt-in flag on compileMIRToCgIR; WebAssembly compilation is unchanged.
Multipass JIT, 338 mainnet contracts Before After
Total compile time 529 s 199 s
JIT code size, page-rounded 228.3 MB 217.1 MB

Execution time of the generated code on evmone-bench is unchanged within noise (geometric mean 0.998 on the main set); individual benchmarks move by up to about 2% either way.

Change doc: docs/changes/2026-10-11-evm-regalloc-compile-time

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

No new tests. ctest (default and CI multipass arguments) and tools/run_evm_tests.py (multipass, interpreter) pass. Benchmark stats are above.

6. Release note

Reduce multipass JIT compile time for large EVM contracts.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

⚡ Performance Regression Check Results

✅ Performance Check Passed (interpreter)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 2.42 2.49 +2.9% PASS
total/main/blake2b_huff/empty 0.04 0.04 -2.1% PASS
total/main/blake2b_shifts/8415nulls 13.84 15.67 +13.2% PASS
total/main/sha1_divs/5311 9.10 8.40 -7.7% PASS
total/main/sha1_divs/empty 0.10 0.10 +2.2% PASS
total/main/sha1_shifts/5311 5.80 5.48 -5.5% PASS
total/main/sha1_shifts/empty 0.04 0.04 -0.7% PASS
total/main/snailtracer/benchmark 90.83 88.14 -3.0% PASS
total/main/structarray_alloc/nfts_rank 1.16 1.15 -0.9% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 -0.4% PASS
total/main/swap_math/received 0.01 0.01 +4.3% PASS
total/main/swap_math/spent 0.01 0.01 -7.3% PASS
total/main/weierstrudel/1 0.32 0.32 +1.2% PASS
total/main/weierstrudel/15 3.53 3.40 -3.7% PASS
total/micro/JUMPDEST_n0/empty 2.64 2.64 +0.0% PASS
total/micro/jump_around/empty 0.11 0.11 +3.6% PASS
total/micro/loop_with_many_jumpdests/empty 69.63 69.91 +0.4% PASS
total/micro/memory_grow_mload/by1 0.18 0.17 -5.8% PASS
total/micro/memory_grow_mload/by16 0.19 0.19 +4.0% PASS
total/micro/memory_grow_mload/by32 0.11 0.11 -0.7% PASS
total/micro/memory_grow_mload/nogrow 0.09 0.09 -4.2% PASS
total/micro/memory_grow_mstore/by1 0.18 0.18 -2.2% PASS
total/micro/memory_grow_mstore/by16 0.11 0.11 +0.0% PASS
total/micro/memory_grow_mstore/by32 0.23 0.23 -1.1% PASS
total/micro/memory_grow_mstore/nogrow 0.18 0.18 +2.7% PASS
total/micro/signextend/one 0.25 0.26 +1.1% PASS
total/micro/signextend/zero 0.50 0.45 -10.2% PASS
total/synth/ADD/b0 2.01 2.01 +0.0% PASS
total/synth/ADD/b1 2.71 2.73 +1.0% PASS
total/synth/ADDRESS/a0 6.18 6.25 +1.2% PASS
total/synth/ADDRESS/a1 5.19 5.16 -0.6% PASS
total/synth/AND/b0 2.16 2.09 -3.2% PASS
total/synth/AND/b1 2.33 2.38 +2.1% PASS
total/synth/BYTE/b0 6.12 6.13 +0.0% PASS
total/synth/BYTE/b1 8.78 8.36 -3.0% PASS
total/synth/CALLDATASIZE/a0 5.53 5.47 -1.0% PASS
total/synth/CALLDATASIZE/a1 3.46 3.45 -0.3% PASS
total/synth/CALLER/a0 5.90 6.36 +7.8% PASS
total/synth/CALLER/a1 6.54 6.56 +0.4% PASS
total/synth/CALLVALUE/a0 3.36 3.36 +0.2% PASS
total/synth/CALLVALUE/a1 6.14 6.13 -0.1% PASS
total/synth/CODESIZE/a0 6.11 6.41 +5.0% PASS
total/synth/CODESIZE/a1 6.23 6.62 +6.2% PASS
total/synth/DUP1/d0 1.71 1.68 -1.4% PASS
total/synth/DUP1/d1 1.96 1.87 -4.8% PASS
total/synth/DUP10/d0 1.79 1.83 +2.4% PASS
total/synth/DUP10/d1 1.98 2.09 +5.7% PASS
total/synth/DUP11/d0 1.23 1.23 -0.5% PASS
total/synth/DUP11/d1 1.89 1.99 +5.4% PASS
total/synth/DUP12/d0 1.85 1.74 -6.0% PASS
total/synth/DUP12/d1 1.23 1.23 -0.0% PASS
total/synth/DUP13/d0 1.74 1.75 +0.8% PASS
total/synth/DUP13/d1 1.88 1.99 +5.8% PASS
total/synth/DUP14/d0 1.23 1.23 +0.1% PASS
total/synth/DUP14/d1 1.90 1.90 +0.3% PASS
total/synth/DUP15/d0 1.79 1.68 -6.2% PASS
total/synth/DUP15/d1 1.17 1.23 +5.3% PASS
total/synth/DUP16/d0 1.78 1.68 -5.2% PASS
total/synth/DUP16/d1 1.96 1.92 -2.0% PASS
total/synth/DUP2/d0 1.23 1.23 +0.0% PASS
total/synth/DUP2/d1 2.01 1.88 -6.7% PASS
total/synth/DUP3/d0 1.69 1.74 +3.2% PASS
total/synth/DUP3/d1 1.17 1.23 +5.5% PASS
total/synth/DUP4/d0 1.71 1.78 +4.4% PASS
total/synth/DUP4/d1 2.00 2.04 +1.9% PASS
total/synth/DUP5/d0 1.23 1.23 -0.0% PASS
total/synth/DUP5/d1 1.95 1.92 -1.4% PASS
total/synth/DUP6/d0 1.74 1.85 +6.5% PASS
total/synth/DUP6/d1 1.17 1.23 +5.7% PASS
total/synth/DUP7/d0 1.70 1.78 +4.7% PASS
total/synth/DUP7/d1 2.03 1.94 -4.2% PASS
total/synth/DUP8/d0 1.23 1.23 -0.2% PASS
total/synth/DUP8/d1 2.00 1.92 -4.0% PASS
total/synth/DUP9/d0 1.75 1.79 +2.2% PASS
total/synth/DUP9/d1 1.17 1.23 +5.1% PASS
total/synth/EQ/b0 4.54 4.51 -0.5% PASS
total/synth/EQ/b1 4.95 4.96 +0.2% PASS
total/synth/GAS/a0 3.77 3.76 -0.2% PASS
total/synth/GAS/a1 7.13 7.04 -1.3% PASS
total/synth/GT/b0 4.83 4.82 -0.2% PASS
total/synth/GT/b1 5.07 4.93 -2.8% PASS
total/synth/ISZERO/u0 7.06 7.09 +0.4% PASS
total/synth/JUMPDEST/n0 2.65 2.64 -0.3% PASS
total/synth/LT/b0 4.81 4.84 +0.7% PASS
total/synth/LT/b1 4.26 4.25 -0.1% PASS
total/synth/MSIZE/a0 5.64 5.47 -3.0% PASS
total/synth/MSIZE/a1 5.86 5.66 -3.3% PASS
total/synth/MUL/b0 5.54 5.54 +0.0% PASS
total/synth/MUL/b1 5.24 5.25 +0.1% PASS
total/synth/NOT/u0 1.95 1.92 +1.2% PASS
total/synth/OR/b0 2.13 2.16 +1.2% PASS
total/synth/OR/b1 1.66 1.64 -1.0% PASS
total/synth/PC/a0 5.29 5.43 +2.7% PASS
total/synth/PC/a1 3.40 3.40 +0.1% PASS
total/synth/PUSH1/p0 1.76 1.75 -0.7% PASS
total/synth/PUSH1/p1 1.72 1.71 -0.2% PASS
total/synth/PUSH10/p0 1.84 1.83 -0.7% PASS
total/synth/PUSH10/p1 1.72 1.72 -0.2% PASS
total/synth/PUSH11/p0 1.77 1.78 +0.1% PASS
total/synth/PUSH11/p1 2.20 2.16 -1.8% PASS
total/synth/PUSH12/p0 1.24 1.23 -0.9% PASS
total/synth/PUSH12/p1 2.08 2.16 +3.9% PASS
total/synth/PUSH13/p0 1.77 1.91 +8.2% PASS
total/synth/PUSH13/p1 1.71 1.73 +1.2% PASS
total/synth/PUSH14/p0 1.89 1.80 -4.7% PASS
total/synth/PUSH14/p1 2.20 2.08 -5.6% PASS
total/synth/PUSH15/p0 1.24 1.23 -0.6% PASS
total/synth/PUSH15/p1 2.29 2.63 +14.6% PASS
total/synth/PUSH16/p0 1.86 1.95 +4.6% PASS
total/synth/PUSH16/p1 1.72 1.72 -0.0% PASS
total/synth/PUSH17/p0 1.76 1.94 +10.0% PASS
total/synth/PUSH17/p1 2.25 2.16 -3.7% PASS
total/synth/PUSH18/p0 1.25 1.23 -1.9% PASS
total/synth/PUSH18/p1 2.11 2.17 +3.1% PASS
total/synth/PUSH19/p0 1.79 1.82 +1.4% PASS
total/synth/PUSH19/p1 1.72 1.72 +0.2% PASS
total/synth/PUSH2/p0 1.76 1.81 +3.0% PASS
total/synth/PUSH2/p1 2.12 2.13 +0.8% PASS
total/synth/PUSH20/p0 1.75 1.88 +7.8% PASS
total/synth/PUSH20/p1 2.12 2.12 -0.3% PASS
total/synth/PUSH21/p0 1.24 1.25 +0.1% PASS
total/synth/PUSH21/p1 2.08 2.19 +5.4% PASS
total/synth/PUSH22/p0 1.79 1.95 +8.9% PASS
total/synth/PUSH22/p1 1.74 1.73 -0.1% PASS
total/synth/PUSH23/p0 1.83 1.84 +0.3% PASS
total/synth/PUSH23/p1 2.22 2.30 +3.8% PASS
total/synth/PUSH24/p0 1.24 1.23 -0.2% PASS
total/synth/PUSH24/p1 2.21 2.21 -0.0% PASS
total/synth/PUSH25/p0 1.87 1.84 -1.3% PASS
total/synth/PUSH25/p1 1.72 1.73 +0.1% PASS
total/synth/PUSH26/p0 1.92 1.78 -7.1% PASS
total/synth/PUSH26/p1 2.31 2.16 -6.5% PASS
total/synth/PUSH27/p0 1.25 1.23 -1.1% PASS
total/synth/PUSH27/p1 2.16 2.19 +1.3% PASS
total/synth/PUSH28/p0 1.85 1.85 +2.5% PASS
total/synth/PUSH28/p1 1.72 1.73 +0.1% PASS
total/synth/PUSH29/p0 1.81 1.83 +1.1% PASS
total/synth/PUSH29/p1 2.09 2.26 +8.0% PASS
total/synth/PUSH3/p0 1.23 1.23 -0.5% PASS
total/synth/PUSH3/p1 2.28 2.20 -3.8% PASS
total/synth/PUSH30/p0 1.29 1.31 +2.0% PASS
total/synth/PUSH30/p1 2.16 2.13 -1.3% PASS
total/synth/PUSH31/p0 1.80 1.86 +3.3% PASS
total/synth/PUSH31/p1 1.76 1.51 -14.0% PASS
total/synth/PUSH32/p0 1.78 1.73 -2.4% PASS
total/synth/PUSH32/p1 2.36 2.26 -4.2% PASS
total/synth/PUSH4/p0 1.77 1.91 +8.2% PASS
total/synth/PUSH4/p1 1.72 1.72 -0.0% PASS
total/synth/PUSH5/p0 1.93 1.84 -4.2% PASS
total/synth/PUSH5/p1 2.16 2.19 +1.0% PASS
total/synth/PUSH6/p0 1.23 1.35 +9.6% PASS
total/synth/PUSH6/p1 2.17 2.27 +4.4% PASS
total/synth/PUSH7/p0 1.86 1.88 +1.0% PASS
total/synth/PUSH7/p1 1.72 1.73 +0.6% PASS
total/synth/PUSH8/p0 1.71 1.82 +6.1% PASS
total/synth/PUSH8/p1 2.07 2.17 +5.2% PASS
total/synth/PUSH9/p0 1.24 1.23 -0.6% PASS
total/synth/PUSH9/p1 2.33 2.16 -7.3% PASS
total/synth/RETURNDATASIZE/a0 3.58 3.54 -1.0% PASS
total/synth/RETURNDATASIZE/a1 6.12 6.51 +6.4% PASS
total/synth/SAR/b0 3.96 3.96 +0.1% PASS
total/synth/SAR/b1 8.38 7.41 -11.5% PASS
total/synth/SGT/b0 3.62 3.62 +0.2% PASS
total/synth/SGT/b1 3.30 3.30 +0.1% PASS
total/synth/SHL/b0 3.83 3.76 -1.9% PASS
total/synth/SHL/b1 1.83 1.82 -1.0% PASS
total/synth/SHR/b0 3.76 3.77 +0.2% PASS
total/synth/SHR/b1 3.12 3.16 +1.5% PASS
total/synth/SIGNEXTEND/b0 3.39 3.44 +1.5% PASS
total/synth/SIGNEXTEND/b1 6.62 6.89 +4.1% PASS
total/synth/SLT/b0 3.42 3.42 +0.0% PASS
total/synth/SLT/b1 3.92 3.84 -2.1% PASS
total/synth/SUB/b0 2.56 2.56 +0.2% PASS
total/synth/SUB/b1 2.75 2.63 -4.3% PASS
total/synth/SWAP1/s0 1.51 1.51 -0.1% PASS
total/synth/SWAP10/s0 1.53 1.52 -0.1% PASS
total/synth/SWAP11/s0 2.70 2.81 +4.1% PASS
total/synth/SWAP12/s0 3.50 2.73 -21.9% PASS
total/synth/SWAP13/s0 1.53 1.53 -0.4% PASS
total/synth/SWAP14/s0 2.65 2.65 +0.0% PASS
total/synth/SWAP15/s0 2.66 2.81 +5.6% PASS
total/synth/SWAP16/s0 1.53 1.53 -0.3% PASS
total/synth/SWAP2/s0 2.78 2.78 +0.0% PASS
total/synth/SWAP3/s0 2.62 2.91 +11.1% PASS
total/synth/SWAP4/s0 1.51 1.51 +0.3% PASS
total/synth/SWAP5/s0 2.73 2.64 -3.5% PASS
total/synth/SWAP6/s0 2.64 2.68 +1.7% PASS
total/synth/SWAP7/s0 1.52 1.52 -0.1% PASS
total/synth/SWAP8/s0 2.75 2.78 +1.2% PASS
total/synth/SWAP9/s0 2.66 2.82 +6.1% PASS
total/synth/XOR/b0 2.13 2.18 +2.4% PASS
total/synth/XOR/b1 2.15 2.20 +2.5% PASS
total/synth/loop_v1 8.92 8.91 -0.1% PASS
total/synth/loop_v2 8.58 8.82 +2.8% PASS

Summary: 194 benchmarks, 0 regressions


✅ Performance Check Passed (multipass)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 1.44 1.49 +3.9% PASS
total/main/blake2b_huff/empty 0.02 0.02 +2.5% PASS
total/main/blake2b_shifts/8415nulls 4.32 4.36 +0.8% PASS
total/main/sha1_divs/5311 0.84 0.85 +0.5% PASS
total/main/sha1_divs/empty 0.01 0.01 -0.2% PASS
total/main/sha1_shifts/5311 0.76 0.76 +0.6% PASS
total/main/sha1_shifts/empty 0.01 0.01 -1.9% PASS
total/main/snailtracer/benchmark 47.88 47.45 -0.9% PASS
total/main/structarray_alloc/nfts_rank 0.26 0.26 -1.2% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 +1.4% PASS
total/main/swap_math/received 0.01 0.01 -4.2% PASS
total/main/swap_math/spent 0.01 0.01 -0.1% PASS
total/main/weierstrudel/1 0.32 0.33 +2.5% PASS
total/main/weierstrudel/15 3.63 3.75 +3.2% PASS
total/micro/JUMPDEST_n0/empty 0.00 0.00 +9.9% PASS
total/micro/jump_around/empty 0.08 0.07 -2.3% PASS
total/micro/loop_with_many_jumpdests/empty 0.01 0.01 -3.0% PASS
total/micro/memory_grow_mload/by1 0.02 0.02 -5.3% PASS
total/micro/memory_grow_mload/by16 0.02 0.02 -3.1% PASS
total/micro/memory_grow_mload/by32 0.01 0.01 -0.5% PASS
total/micro/memory_grow_mload/nogrow 0.01 0.01 +2.2% PASS
total/micro/memory_grow_mstore/by1 0.02 0.02 +6.6% PASS
total/micro/memory_grow_mstore/by16 0.01 0.01 +0.2% PASS
total/micro/memory_grow_mstore/by32 0.02 0.02 -3.3% PASS
total/micro/memory_grow_mstore/nogrow 0.02 0.02 -2.5% PASS
total/micro/signextend/one 0.01 0.01 +0.3% PASS
total/micro/signextend/zero 0.01 0.01 +0.4% PASS
total/synth/ADD/b0 0.00 0.00 +1.0% PASS
total/synth/ADD/b1 0.00 0.00 +0.4% PASS
total/synth/ADDRESS/a0 0.22 0.25 +11.0% PASS
total/synth/ADDRESS/a1 0.15 0.15 +0.1% PASS
total/synth/AND/b0 0.00 0.00 +0.2% PASS
total/synth/AND/b1 0.00 0.00 +0.6% PASS
total/synth/BYTE/b0 0.00 0.00 +1.6% PASS
total/synth/BYTE/b1 0.00 0.00 +0.7% PASS
total/synth/CALLDATASIZE/a0 0.12 0.12 -0.9% PASS
total/synth/CALLDATASIZE/a1 0.07 0.07 -0.2% PASS
total/synth/CALLER/a0 0.22 0.22 -0.6% PASS
total/synth/CALLER/a1 0.22 0.23 +1.1% PASS
total/synth/CALLVALUE/a0 0.19 0.19 -0.2% PASS
total/synth/CALLVALUE/a1 0.29 0.29 -2.4% PASS
total/synth/CODESIZE/a0 0.12 0.12 -0.7% PASS
total/synth/CODESIZE/a1 0.12 0.12 -2.7% PASS
total/synth/DUP1/d0 0.00 0.00 +0.6% PASS
total/synth/DUP1/d1 0.00 0.00 -1.8% PASS
total/synth/DUP10/d0 0.00 0.00 -0.7% PASS
total/synth/DUP10/d1 0.00 0.00 +0.4% PASS
total/synth/DUP11/d0 0.00 0.00 +0.6% PASS
total/synth/DUP11/d1 0.00 0.00 +0.3% PASS
total/synth/DUP12/d0 0.00 0.00 -0.0% PASS
total/synth/DUP12/d1 0.00 0.00 +1.5% PASS
total/synth/DUP13/d0 0.00 0.00 -0.2% PASS
total/synth/DUP13/d1 0.00 0.00 -0.3% PASS
total/synth/DUP14/d0 0.00 0.00 +0.9% PASS
total/synth/DUP14/d1 0.00 0.00 +0.6% PASS
total/synth/DUP15/d0 0.00 0.00 +0.8% PASS
total/synth/DUP15/d1 0.00 0.00 +1.5% PASS
total/synth/DUP16/d0 0.00 0.00 -1.2% PASS
total/synth/DUP16/d1 0.00 0.00 +1.1% PASS
total/synth/DUP2/d0 0.00 0.00 +0.3% PASS
total/synth/DUP2/d1 0.00 0.00 -0.3% PASS
total/synth/DUP3/d0 0.00 0.00 +0.3% PASS
total/synth/DUP3/d1 0.00 0.00 +1.3% PASS
total/synth/DUP4/d0 0.00 0.00 +0.6% PASS
total/synth/DUP4/d1 0.00 0.00 +1.1% PASS
total/synth/DUP5/d0 0.00 0.00 +1.7% PASS
total/synth/DUP5/d1 0.00 0.00 +0.6% PASS
total/synth/DUP6/d0 0.00 0.00 +0.3% PASS
total/synth/DUP6/d1 0.00 0.00 +1.2% PASS
total/synth/DUP7/d0 0.00 0.00 +1.0% PASS
total/synth/DUP7/d1 0.00 0.00 -1.2% PASS
total/synth/DUP8/d0 0.00 0.00 +1.2% PASS
total/synth/DUP8/d1 0.00 0.00 -1.0% PASS
total/synth/DUP9/d0 0.00 0.00 -0.5% PASS
total/synth/DUP9/d1 0.00 0.00 +1.2% PASS
total/synth/EQ/b0 0.00 0.00 +0.6% PASS
total/synth/EQ/b1 0.00 0.00 +0.1% PASS
total/synth/GAS/a0 0.77 0.76 -0.1% PASS
total/synth/GAS/a1 0.94 0.93 -0.9% PASS
total/synth/GT/b0 0.00 0.00 +0.1% PASS
total/synth/GT/b1 0.00 0.00 +0.2% PASS
total/synth/ISZERO/u0 0.00 0.00 +3.2% PASS
total/synth/JUMPDEST/n0 0.00 0.00 +1.8% PASS
total/synth/LT/b0 0.00 0.00 +0.1% PASS
total/synth/LT/b1 0.00 0.00 +0.9% PASS
total/synth/MSIZE/a0 0.00 0.00 +0.7% PASS
total/synth/MSIZE/a1 0.00 0.00 +0.7% PASS
total/synth/MUL/b0 0.00 0.00 +0.2% PASS
total/synth/MUL/b1 0.00 0.00 +0.9% PASS
total/synth/NOT/u0 0.00 0.00 -1.0% PASS
total/synth/OR/b0 0.00 0.00 +0.4% PASS
total/synth/OR/b1 0.00 0.00 +0.9% PASS
total/synth/PC/a0 0.00 0.00 -0.1% PASS
total/synth/PC/a1 0.00 0.00 +0.9% PASS
total/synth/PUSH1/p0 0.00 0.00 +0.8% PASS
total/synth/PUSH1/p1 0.00 0.00 +1.7% PASS
total/synth/PUSH10/p0 0.00 0.00 +3.3% PASS
total/synth/PUSH10/p1 0.00 0.00 +3.4% PASS
total/synth/PUSH11/p0 0.00 0.00 -0.4% PASS
total/synth/PUSH11/p1 0.00 0.00 +2.4% PASS
total/synth/PUSH12/p0 0.00 0.00 +3.1% PASS
total/synth/PUSH12/p1 0.00 0.00 -2.1% PASS
total/synth/PUSH13/p0 0.00 0.00 -5.1% PASS
total/synth/PUSH13/p1 0.00 0.00 +2.9% PASS
total/synth/PUSH14/p0 0.00 0.00 -1.6% PASS
total/synth/PUSH14/p1 0.00 0.00 -5.4% PASS
total/synth/PUSH15/p0 0.00 0.00 +1.1% PASS
total/synth/PUSH15/p1 0.00 0.00 +0.1% PASS
total/synth/PUSH16/p0 0.00 0.00 -3.3% PASS
total/synth/PUSH16/p1 0.00 0.00 +1.0% PASS
total/synth/PUSH17/p0 0.00 0.00 -0.8% PASS
total/synth/PUSH17/p1 0.00 0.00 +2.0% PASS
total/synth/PUSH18/p0 0.00 0.00 +2.7% PASS
total/synth/PUSH18/p1 0.00 0.00 +2.6% PASS
total/synth/PUSH19/p0 0.00 0.00 -4.9% PASS
total/synth/PUSH19/p1 0.00 0.00 -0.6% PASS
total/synth/PUSH2/p0 0.00 0.00 -1.5% PASS
total/synth/PUSH2/p1 0.00 0.00 -1.2% PASS
total/synth/PUSH20/p0 0.00 0.00 -1.5% PASS
total/synth/PUSH20/p1 0.00 0.00 +0.9% PASS
total/synth/PUSH21/p0 0.00 0.00 +1.6% PASS
total/synth/PUSH21/p1 0.00 0.00 -2.0% PASS
total/synth/PUSH22/p0 1.73 1.78 +3.1% PASS
total/synth/PUSH22/p1 1.74 1.74 +0.3% PASS
total/synth/PUSH23/p0 1.72 1.71 -0.6% PASS
total/synth/PUSH23/p1 1.99 2.02 +1.5% PASS
total/synth/PUSH24/p0 1.26 1.24 -1.7% PASS
total/synth/PUSH24/p1 2.00 2.02 +1.0% PASS
total/synth/PUSH25/p0 2.04 1.80 -11.7% PASS
total/synth/PUSH25/p1 1.72 1.74 +1.1% PASS
total/synth/PUSH26/p0 1.80 1.72 -4.0% PASS
total/synth/PUSH26/p1 1.97 2.00 +1.4% PASS
total/synth/PUSH27/p0 1.25 1.25 -0.2% PASS
total/synth/PUSH27/p1 2.11 1.95 -7.7% PASS
total/synth/PUSH28/p0 1.72 1.77 +2.8% PASS
total/synth/PUSH28/p1 1.74 1.73 -1.0% PASS
total/synth/PUSH29/p0 1.70 1.88 +10.9% PASS
total/synth/PUSH29/p1 2.00 2.02 +0.7% PASS
total/synth/PUSH3/p0 0.00 0.00 +0.9% PASS
total/synth/PUSH3/p1 0.00 0.00 +0.5% PASS
total/synth/PUSH30/p0 1.33 1.31 -1.3% PASS
total/synth/PUSH30/p1 2.08 2.04 -2.0% PASS
total/synth/PUSH31/p0 1.70 1.71 +0.7% PASS
total/synth/PUSH31/p1 1.74 1.74 -0.3% PASS
total/synth/PUSH32/p0 1.72 1.72 +0.0% PASS
total/synth/PUSH32/p1 1.94 1.95 +0.8% PASS
total/synth/PUSH4/p0 0.00 0.00 -2.3% PASS
total/synth/PUSH4/p1 0.00 0.00 -0.0% PASS
total/synth/PUSH5/p0 0.00 0.00 -2.9% PASS
total/synth/PUSH5/p1 0.00 0.00 +1.5% PASS
total/synth/PUSH6/p0 0.00 0.00 +1.0% PASS
total/synth/PUSH6/p1 0.00 0.00 -0.4% PASS
total/synth/PUSH7/p0 0.00 0.00 -5.0% PASS
total/synth/PUSH7/p1 0.00 0.00 +1.3% PASS
total/synth/PUSH8/p0 0.00 0.00 +4.1% PASS
total/synth/PUSH8/p1 0.00 0.00 -1.3% PASS
total/synth/PUSH9/p0 0.00 0.00 +0.5% PASS
total/synth/PUSH9/p1 0.00 0.00 -4.6% PASS
total/synth/RETURNDATASIZE/a0 0.03 0.03 +0.1% PASS
total/synth/RETURNDATASIZE/a1 0.06 0.06 +5.0% PASS
total/synth/SAR/b0 0.00 0.00 +1.4% PASS
total/synth/SAR/b1 0.00 0.00 +1.1% PASS
total/synth/SGT/b0 0.00 0.00 -2.2% PASS
total/synth/SGT/b1 0.00 0.00 +1.8% PASS
total/synth/SHL/b0 0.00 0.00 +0.8% PASS
total/synth/SHL/b1 0.00 0.00 +1.2% PASS
total/synth/SHR/b0 0.00 0.00 +0.1% PASS
total/synth/SHR/b1 0.00 0.00 +0.1% PASS
total/synth/SIGNEXTEND/b0 0.00 0.00 +1.1% PASS
total/synth/SIGNEXTEND/b1 0.00 0.00 -0.0% PASS
total/synth/SLT/b0 0.00 0.00 +1.7% PASS
total/synth/SLT/b1 0.00 0.00 -0.4% PASS
total/synth/SUB/b0 0.00 0.00 +0.6% PASS
total/synth/SUB/b1 0.00 0.00 -0.6% PASS
total/synth/SWAP1/s0 0.00 0.00 +1.4% PASS
total/synth/SWAP10/s0 0.00 0.00 +1.1% PASS
total/synth/SWAP11/s0 0.00 0.00 -0.1% PASS
total/synth/SWAP12/s0 0.00 0.00 -0.3% PASS
total/synth/SWAP13/s0 0.00 0.00 +0.7% PASS
total/synth/SWAP14/s0 0.00 0.00 +0.5% PASS
total/synth/SWAP15/s0 0.00 0.00 +0.8% PASS
total/synth/SWAP16/s0 0.00 0.00 +1.0% PASS
total/synth/SWAP2/s0 0.00 0.00 -0.4% PASS
total/synth/SWAP3/s0 0.00 0.00 -0.6% PASS
total/synth/SWAP4/s0 0.00 0.00 +0.8% PASS
total/synth/SWAP5/s0 0.00 0.00 -0.0% PASS
total/synth/SWAP6/s0 0.00 0.00 +0.1% PASS
total/synth/SWAP7/s0 0.00 0.00 +0.6% PASS
total/synth/SWAP8/s0 0.00 0.00 +1.0% PASS
total/synth/SWAP9/s0 0.00 0.00 +1.2% PASS
total/synth/XOR/b0 0.00 0.00 +0.5% PASS
total/synth/XOR/b1 0.00 0.00 +0.6% PASS
total/synth/loop_v1 8.28 8.45 +2.1% PASS
total/synth/loop_v2 8.57 8.27 -3.5% PASS

Summary: 194 benchmarks, 0 regressions


@abmcar
abmcar marked this pull request as ready for review October 10, 2026 10:04
Copilot AI balanced review requested due to automatic review settings October 10, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

abmcar and others added 2 commits October 11, 2026 14:45
joinVirtRegs built both JoinVals, whose constructors size arrays by the
interval's value count, before asking isHighCostLiveInterval whether to
give up. On EVM functions, whose stack-size and stack-top intervals hold
thousands of values, most of those attempts are abandoned. Check first;
the coalescer's decisions and the generated code are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The greedy allocator treated the instance pointer, an EVM function's only
parameter and read throughout it, like any other long interval: on large
contracts it split, spilled and revisited it until that work dominated
compile time. Mark its interval unspillable before greedy allocation, via
an opt-in compileMIRToCgIR flag that only the EVM compiler sets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abmcar
abmcar force-pushed the perf/evm-keep-instance-pointer-in-register branch from 6cf2c08 to 92413f2 Compare October 11, 2026 07:06
@abmcar abmcar changed the title perf(compiler): keep the EVM instance pointer in a register perf(compiler): reduce register allocation time on large EVM functions Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants