Skip to content

perf(evm): add soft-fallback opcode table for const memory precheck#484

Open
ys8888john wants to merge 2 commits into
DTVMStack:mainfrom
ys8888john:feat/extend-const-precheck-coverage
Open

perf(evm): add soft-fallback opcode table for const memory precheck#484
ys8888john wants to merge 2 commits into
DTVMStack:mainfrom
ys8888john:feat/extend-const-precheck-coverage

Conversation

@ys8888john
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):

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

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

6. Release note

None

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

⚡ 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 1.58 1.75 +10.6% PASS
total/main/blake2b_huff/empty 0.03 0.03 +10.4% PASS
total/main/blake2b_shifts/8415nulls 12.05 12.67 +5.1% PASS
total/main/sha1_divs/5311 5.05 5.66 +12.1% PASS
total/main/sha1_divs/empty 0.06 0.06 +1.7% PASS
total/main/sha1_shifts/5311 2.89 3.10 +7.3% PASS
total/main/sha1_shifts/empty 0.04 0.04 +6.9% PASS
total/main/snailtracer/benchmark 53.56 54.47 +1.7% PASS
total/main/structarray_alloc/nfts_rank 1.06 1.13 +6.3% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 +9.6% PASS
total/main/swap_math/received 0.00 0.01 +8.7% PASS
total/main/swap_math/spent 0.00 0.00 +10.0% PASS
total/main/weierstrudel/1 0.28 0.29 +3.3% PASS
total/main/weierstrudel/15 3.16 3.35 +6.1% PASS
total/micro/JUMPDEST_n0/empty 1.71 1.84 +7.9% PASS
total/micro/jump_around/empty 0.10 0.06 -35.6% PASS
total/micro/loop_with_many_jumpdests/empty 23.19 28.14 +21.3% PASS
total/micro/memory_grow_mload/by1 0.09 0.09 -3.4% PASS
total/micro/memory_grow_mload/by16 0.10 0.10 -4.8% PASS
total/micro/memory_grow_mload/by32 0.11 0.11 +2.9% PASS
total/micro/memory_grow_mload/nogrow 0.10 0.09 -11.0% PASS
total/micro/memory_grow_mstore/by1 0.10 0.10 -7.1% PASS
total/micro/memory_grow_mstore/by16 0.11 0.12 +8.0% PASS
total/micro/memory_grow_mstore/by32 0.12 0.14 +14.1% PASS
total/micro/memory_grow_mstore/nogrow 0.10 0.09 -4.1% PASS
total/micro/signextend/one 0.23 0.26 +10.6% PASS
total/micro/signextend/zero 0.23 0.25 +6.4% PASS
total/synth/ADD/b0 2.01 2.20 +9.6% PASS
total/synth/ADD/b1 1.99 2.29 +14.6% PASS
total/synth/ADDRESS/a0 4.83 5.54 +14.7% PASS
total/synth/ADDRESS/a1 5.43 6.08 +11.9% PASS
total/synth/AND/b0 1.71 1.86 +8.7% PASS
total/synth/AND/b1 1.71 1.89 +10.1% PASS
total/synth/BYTE/b0 6.12 6.80 +11.1% PASS
total/synth/BYTE/b1 4.77 5.40 +13.2% PASS
total/synth/CALLDATASIZE/a0 3.58 3.40 -5.2% PASS
total/synth/CALLDATASIZE/a1 4.07 4.13 +1.5% PASS
total/synth/CALLER/a0 4.82 5.54 +14.9% PASS
total/synth/CALLER/a1 5.42 5.81 +7.2% PASS
total/synth/CALLVALUE/a0 3.76 3.75 -0.2% PASS
total/synth/CALLVALUE/a1 3.77 3.33 -11.8% PASS
total/synth/CODESIZE/a0 3.75 3.78 +1.0% PASS
total/synth/CODESIZE/a1 4.02 4.03 +0.2% PASS
total/synth/DUP1/d0 1.22 1.38 +13.0% PASS
total/synth/DUP1/d1 1.39 1.48 +6.4% PASS
total/synth/DUP10/d0 1.07 1.39 +30.1% PASS
total/synth/DUP10/d1 1.15 1.12 -2.8% PASS
total/synth/DUP11/d0 1.31 1.02 -21.9% PASS
total/synth/DUP11/d1 1.39 1.13 -18.7% PASS
total/synth/DUP12/d0 1.30 1.38 +6.1% PASS
total/synth/DUP12/d1 1.16 1.13 -2.1% PASS
total/synth/DUP13/d0 1.39 1.29 -6.7% PASS
total/synth/DUP13/d1 1.39 1.12 -19.7% PASS
total/synth/DUP14/d0 1.12 1.38 +24.0% PASS
total/synth/DUP14/d1 1.16 1.12 -3.4% PASS
total/synth/DUP15/d0 1.31 1.38 +5.7% PASS
total/synth/DUP15/d1 1.24 1.12 -9.6% PASS
total/synth/DUP16/d0 1.30 1.29 -0.3% PASS
total/synth/DUP16/d1 1.31 1.12 -14.6% PASS
total/synth/DUP2/d0 1.31 1.29 -1.0% PASS
total/synth/DUP2/d1 1.16 1.12 -3.0% PASS
total/synth/DUP3/d0 1.22 1.29 +5.5% PASS
total/synth/DUP3/d1 1.16 1.39 +20.8% PASS
total/synth/DUP4/d0 1.28 1.38 +8.0% PASS
total/synth/DUP4/d1 1.30 1.12 -14.1% PASS
total/synth/DUP5/d0 1.31 1.38 +5.9% PASS
total/synth/DUP5/d1 1.39 1.39 +0.1% PASS
total/synth/DUP6/d0 1.31 1.29 -1.2% PASS
total/synth/DUP6/d1 1.15 1.13 -1.9% PASS
total/synth/DUP7/d0 1.31 1.38 +5.6% PASS
total/synth/DUP7/d1 1.39 1.12 -19.5% PASS
total/synth/DUP8/d0 1.07 1.38 +29.1% PASS
total/synth/DUP8/d1 1.15 1.15 +0.1% PASS
total/synth/DUP9/d0 1.31 1.38 +5.6% PASS
total/synth/DUP9/d1 1.39 1.39 +0.0% PASS
total/synth/EQ/b0 2.76 3.12 +12.9% PASS
total/synth/EQ/b1 1.33 1.48 +10.9% PASS
total/synth/GAS/a0 3.81 3.87 +1.6% PASS
total/synth/GAS/a1 3.87 3.84 -0.7% PASS
total/synth/GT/b0 2.61 3.01 +15.3% PASS
total/synth/GT/b1 1.55 1.58 +1.7% PASS
total/synth/ISZERO/u0 1.15 0.96 -16.6% PASS
total/synth/JUMPDEST/n0 1.69 1.85 +9.4% PASS
total/synth/LT/b0 2.61 3.00 +15.0% PASS
total/synth/LT/b1 1.56 1.49 -4.0% PASS
total/synth/MSIZE/a0 4.23 4.90 +15.7% PASS
total/synth/MSIZE/a1 4.85 5.09 +4.9% PASS
total/synth/MUL/b0 5.33 6.18 +16.0% PASS
total/synth/MUL/b1 5.40 6.26 +15.9% PASS
total/synth/NOT/u0 1.81 1.83 +1.3% PASS
total/synth/OR/b0 1.65 1.87 +13.4% PASS
total/synth/OR/b1 1.71 1.89 +10.1% PASS
total/synth/PC/a0 3.58 3.50 -2.4% PASS
total/synth/PC/a1 3.62 4.26 +17.9% PASS
total/synth/PUSH1/p0 1.07 1.02 -5.1% PASS
total/synth/PUSH1/p1 1.38 1.13 -18.2% PASS
total/synth/PUSH10/p0 0.89 0.93 +5.0% PASS
total/synth/PUSH10/p1 1.42 1.14 -19.6% PASS
total/synth/PUSH11/p0 1.13 1.02 -10.2% PASS
total/synth/PUSH11/p1 1.42 1.39 -2.3% PASS
total/synth/PUSH12/p0 1.07 1.02 -4.3% PASS
total/synth/PUSH12/p1 1.43 1.15 -19.5% PASS
total/synth/PUSH13/p0 1.07 1.02 -4.2% PASS
total/synth/PUSH13/p1 1.41 1.16 -17.7% PASS
total/synth/PUSH14/p0 0.94 1.02 +8.0% PASS
total/synth/PUSH14/p1 1.42 1.42 +0.0% PASS
total/synth/PUSH15/p0 0.99 1.29 +31.3% PASS
total/synth/PUSH15/p1 1.51 1.26 -16.9% PASS
total/synth/PUSH16/p0 1.15 0.93 -19.1% PASS
total/synth/PUSH16/p1 1.42 1.42 -0.2% PASS
total/synth/PUSH17/p0 0.91 1.02 +12.5% PASS
total/synth/PUSH17/p1 1.42 1.13 -20.2% PASS
total/synth/PUSH18/p0 0.91 1.02 +12.4% PASS
total/synth/PUSH18/p1 1.43 1.13 -20.9% PASS
total/synth/PUSH19/p0 0.88 1.02 +15.4% PASS
total/synth/PUSH19/p1 1.42 1.43 +0.5% PASS
total/synth/PUSH2/p0 0.91 1.29 +42.8% PASS
total/synth/PUSH2/p1 1.40 1.38 -1.6% PASS
total/synth/PUSH20/p0 0.91 1.02 +11.8% PASS
total/synth/PUSH20/p1 1.44 1.15 -19.9% PASS
total/synth/PUSH21/p0 1.07 1.02 -4.6% PASS
total/synth/PUSH21/p1 1.43 1.40 -2.1% PASS
total/synth/PUSH22/p0 1.09 1.29 +18.6% PASS
total/synth/PUSH22/p1 1.44 1.40 -2.6% PASS
total/synth/PUSH23/p0 1.15 1.02 -11.2% PASS
total/synth/PUSH23/p1 1.43 1.42 -0.8% PASS
total/synth/PUSH24/p0 1.07 0.94 -12.0% PASS
total/synth/PUSH24/p1 1.43 1.41 -1.6% PASS
total/synth/PUSH25/p0 0.91 1.02 +11.8% PASS
total/synth/PUSH25/p1 1.44 1.14 -20.8% PASS
total/synth/PUSH26/p0 1.14 0.99 -13.1% PASS
total/synth/PUSH26/p1 1.43 1.14 -20.2% PASS
total/synth/PUSH27/p0 1.07 1.02 -4.4% PASS
total/synth/PUSH27/p1 1.46 1.14 -21.9% PASS
total/synth/PUSH28/p0 1.05 1.02 -2.5% PASS
total/synth/PUSH28/p1 1.46 1.19 -18.0% PASS
total/synth/PUSH29/p0 1.12 1.02 -8.7% PASS
total/synth/PUSH29/p1 1.44 1.43 -0.8% PASS
total/synth/PUSH3/p0 1.07 0.94 -12.3% PASS
total/synth/PUSH3/p1 1.42 1.39 -2.1% PASS
total/synth/PUSH30/p0 1.07 1.02 -4.1% PASS
total/synth/PUSH30/p1 1.42 1.42 -0.4% PASS
total/synth/PUSH31/p0 1.15 1.02 -11.3% PASS
total/synth/PUSH31/p1 1.57 1.17 -25.1% PASS
total/synth/PUSH32/p0 0.91 0.99 +8.2% PASS
total/synth/PUSH32/p1 1.47 1.35 -8.4% PASS
total/synth/PUSH4/p0 1.10 1.02 -7.0% PASS
total/synth/PUSH4/p1 1.42 1.38 -3.1% PASS
total/synth/PUSH5/p0 1.07 1.02 -5.1% PASS
total/synth/PUSH5/p1 1.41 1.12 -20.8% PASS
total/synth/PUSH6/p0 1.15 1.02 -11.4% PASS
total/synth/PUSH6/p1 1.41 1.38 -1.7% PASS
total/synth/PUSH7/p0 1.07 1.29 +21.0% PASS
total/synth/PUSH7/p1 1.42 1.14 -20.0% PASS
total/synth/PUSH8/p0 1.07 1.29 +20.9% PASS
total/synth/PUSH8/p1 1.42 1.39 -2.1% PASS
total/synth/PUSH9/p0 0.83 1.02 +23.2% PASS
total/synth/PUSH9/p1 1.42 1.38 -2.6% PASS
total/synth/RETURNDATASIZE/a0 3.99 3.63 -9.0% PASS
total/synth/RETURNDATASIZE/a1 4.03 3.99 -0.8% PASS
total/synth/SAR/b0 3.79 4.33 +14.4% PASS
total/synth/SAR/b1 4.32 4.92 +14.0% PASS
total/synth/SGT/b0 2.61 3.01 +15.7% PASS
total/synth/SGT/b1 1.56 1.85 +18.6% PASS
total/synth/SHL/b0 3.04 3.50 +15.4% PASS
total/synth/SHL/b1 1.56 1.68 +7.6% PASS
total/synth/SHR/b0 2.98 3.51 +18.0% PASS
total/synth/SHR/b1 1.51 1.63 +7.7% PASS
total/synth/SIGNEXTEND/b0 3.58 3.77 +5.1% PASS
total/synth/SIGNEXTEND/b1 3.73 3.80 +1.8% PASS
total/synth/SLT/b0 2.62 3.07 +17.5% PASS
total/synth/SLT/b1 1.48 1.94 +31.4% PASS
total/synth/SUB/b0 1.98 2.19 +10.9% PASS
total/synth/SUB/b1 1.97 2.29 +15.9% PASS
total/synth/SWAP1/s0 1.49 1.67 +12.3% PASS
total/synth/SWAP10/s0 1.50 1.68 +12.1% PASS
total/synth/SWAP11/s0 1.50 1.69 +12.3% PASS
total/synth/SWAP12/s0 1.51 1.69 +12.1% PASS
total/synth/SWAP13/s0 1.51 1.69 +12.2% PASS
total/synth/SWAP14/s0 1.51 1.69 +12.2% PASS
total/synth/SWAP15/s0 1.51 1.69 +12.0% PASS
total/synth/SWAP16/s0 1.51 1.69 +12.1% PASS
total/synth/SWAP2/s0 1.53 1.67 +9.3% PASS
total/synth/SWAP3/s0 1.49 1.68 +12.2% PASS
total/synth/SWAP4/s0 1.49 1.68 +12.2% PASS
total/synth/SWAP5/s0 1.50 1.68 +12.2% PASS
total/synth/SWAP6/s0 1.50 1.68 +12.2% PASS
total/synth/SWAP7/s0 1.50 1.68 +12.3% PASS
total/synth/SWAP8/s0 1.50 1.68 +12.3% PASS
total/synth/SWAP9/s0 1.50 1.68 +12.2% PASS
total/synth/XOR/b0 1.55 1.74 +12.4% PASS
total/synth/XOR/b1 1.55 1.75 +13.0% PASS
total/synth/loop_v1 4.44 4.54 +2.3% PASS
total/synth/loop_v2 4.43 4.54 +2.6% 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 0.83 1.10 +31.6% PASS
total/main/blake2b_huff/empty 0.01 0.02 +23.6% PASS
total/main/blake2b_shifts/8415nulls 3.81 4.99 +30.8% PASS
total/main/sha1_divs/5311 0.48 0.62 +29.1% PASS
total/main/sha1_divs/empty 0.01 0.01 +28.6% PASS
total/main/sha1_shifts/5311 0.46 0.59 +28.1% PASS
total/main/sha1_shifts/empty 0.01 0.01 +28.4% PASS
total/main/snailtracer/benchmark 28.47 36.68 +28.8% REGRESSED
total/main/structarray_alloc/nfts_rank 0.24 0.31 +28.4% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 +25.3% PASS
total/main/swap_math/received 0.00 0.00 +25.3% PASS
total/main/swap_math/spent 0.00 0.00 +24.3% PASS
total/main/weierstrudel/1 0.19 0.25 +29.6% PASS
total/main/weierstrudel/15 2.30 2.97 +28.8% PASS
total/micro/JUMPDEST_n0/empty 0.00 0.00 +26.4% PASS
total/micro/jump_around/empty 0.03 0.03 +29.6% PASS
total/micro/loop_with_many_jumpdests/empty 0.00 0.00 +28.1% PASS
total/micro/memory_grow_mload/by1 0.01 0.01 +29.0% PASS
total/micro/memory_grow_mload/by16 0.01 0.01 +28.5% PASS
total/micro/memory_grow_mload/by32 0.01 0.01 +29.1% PASS
total/micro/memory_grow_mload/nogrow 0.01 0.01 +29.2% PASS
total/micro/memory_grow_mstore/by1 0.01 0.02 +30.9% PASS
total/micro/memory_grow_mstore/by16 0.01 0.02 +29.7% PASS
total/micro/memory_grow_mstore/by32 0.01 0.02 +30.0% PASS
total/micro/memory_grow_mstore/nogrow 0.01 0.02 +29.2% PASS
total/micro/signextend/one 0.07 0.08 +23.7% PASS
total/micro/signextend/zero 0.07 0.08 +23.8% PASS
total/synth/ADD/b0 0.00 0.00 +25.6% PASS
total/synth/ADD/b1 0.00 0.00 +25.4% PASS
total/synth/ADDRESS/a0 0.12 0.15 +26.3% PASS
total/synth/ADDRESS/a1 0.12 0.15 +25.8% PASS
total/synth/AND/b0 0.00 0.00 +25.2% PASS
total/synth/AND/b1 0.00 0.00 +25.3% PASS
total/synth/BYTE/b0 0.00 0.00 +24.9% PASS
total/synth/BYTE/b1 0.00 0.00 +25.4% PASS
total/synth/CALLDATASIZE/a0 0.05 0.07 +28.9% PASS
total/synth/CALLDATASIZE/a1 0.05 0.07 +28.9% PASS
total/synth/CALLER/a0 0.15 0.20 +28.1% PASS
total/synth/CALLER/a1 0.15 0.20 +28.6% PASS
total/synth/CALLVALUE/a0 0.23 0.30 +28.8% PASS
total/synth/CALLVALUE/a1 0.23 0.30 +28.9% PASS
total/synth/CODESIZE/a0 0.05 0.07 +28.9% PASS
total/synth/CODESIZE/a1 0.05 0.07 +28.8% PASS
total/synth/DUP1/d0 0.00 0.00 +25.4% PASS
total/synth/DUP1/d1 0.00 0.00 +25.2% PASS
total/synth/DUP10/d0 0.00 0.00 +25.4% PASS
total/synth/DUP10/d1 0.00 0.00 +25.5% PASS
total/synth/DUP11/d0 0.00 0.00 +25.6% PASS
total/synth/DUP11/d1 0.00 0.00 +24.9% PASS
total/synth/DUP12/d0 0.00 0.00 +25.3% PASS
total/synth/DUP12/d1 0.00 0.00 +25.3% PASS
total/synth/DUP13/d0 0.00 0.00 +25.3% PASS
total/synth/DUP13/d1 0.00 0.00 +25.3% PASS
total/synth/DUP14/d0 0.00 0.00 +25.3% PASS
total/synth/DUP14/d1 0.00 0.00 +25.3% PASS
total/synth/DUP15/d0 0.00 0.00 +25.2% PASS
total/synth/DUP15/d1 0.00 0.00 +25.5% PASS
total/synth/DUP16/d0 0.00 0.00 +25.2% PASS
total/synth/DUP16/d1 0.00 0.00 +25.2% PASS
total/synth/DUP2/d0 0.00 0.00 +25.4% PASS
total/synth/DUP2/d1 0.00 0.00 +25.5% PASS
total/synth/DUP3/d0 0.00 0.00 +24.7% PASS
total/synth/DUP3/d1 0.00 0.00 +25.4% PASS
total/synth/DUP4/d0 0.00 0.00 +25.4% PASS
total/synth/DUP4/d1 0.00 0.00 +25.3% PASS
total/synth/DUP5/d0 0.00 0.00 +25.2% PASS
total/synth/DUP5/d1 0.00 0.00 +25.4% PASS
total/synth/DUP6/d0 0.00 0.00 +25.4% PASS
total/synth/DUP6/d1 0.00 0.00 +25.4% PASS
total/synth/DUP7/d0 0.00 0.00 +25.3% PASS
total/synth/DUP7/d1 0.00 0.00 +25.3% PASS
total/synth/DUP8/d0 0.00 0.00 +25.4% PASS
total/synth/DUP8/d1 0.00 0.00 +25.5% PASS
total/synth/DUP9/d0 0.00 0.00 +25.3% PASS
total/synth/DUP9/d1 0.00 0.00 +25.2% PASS
total/synth/EQ/b0 0.00 0.00 +25.3% PASS
total/synth/EQ/b1 0.00 0.00 +25.3% PASS
total/synth/GAS/a0 0.67 0.86 +28.9% PASS
total/synth/GAS/a1 0.67 0.86 +29.0% PASS
total/synth/GT/b0 0.00 0.00 +25.2% PASS
total/synth/GT/b1 0.00 0.00 +25.5% PASS
total/synth/ISZERO/u0 0.00 0.00 +25.3% PASS
total/synth/JUMPDEST/n0 0.00 0.00 +25.8% PASS
total/synth/LT/b0 0.00 0.00 +25.5% PASS
total/synth/LT/b1 0.00 0.00 +25.2% PASS
total/synth/MSIZE/a0 0.00 0.00 +25.4% PASS
total/synth/MSIZE/a1 0.00 0.00 +25.4% PASS
total/synth/MUL/b0 0.00 0.00 +25.3% PASS
total/synth/MUL/b1 0.00 0.00 +25.3% PASS
total/synth/NOT/u0 0.00 0.00 +24.5% PASS
total/synth/OR/b0 0.00 0.00 +25.2% PASS
total/synth/OR/b1 0.00 0.00 +25.5% PASS
total/synth/PC/a0 0.00 0.00 +25.5% PASS
total/synth/PC/a1 0.00 0.00 +25.5% PASS
total/synth/PUSH1/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH1/p1 0.00 0.00 +25.4% PASS
total/synth/PUSH10/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH10/p1 0.00 0.00 +25.5% PASS
total/synth/PUSH11/p0 0.00 0.00 +25.6% PASS
total/synth/PUSH11/p1 0.00 0.00 +25.3% PASS
total/synth/PUSH12/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH12/p1 0.00 0.00 +25.5% PASS
total/synth/PUSH13/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH13/p1 0.00 0.00 +25.7% PASS
total/synth/PUSH14/p0 0.00 0.00 +25.5% PASS
total/synth/PUSH14/p1 0.00 0.00 +24.8% PASS
total/synth/PUSH15/p0 0.00 0.00 +25.0% PASS
total/synth/PUSH15/p1 0.00 0.00 +25.7% PASS
total/synth/PUSH16/p0 0.00 0.00 +25.4% PASS
total/synth/PUSH16/p1 0.00 0.00 +25.1% PASS
total/synth/PUSH17/p0 0.00 0.00 +25.1% PASS
total/synth/PUSH17/p1 0.00 0.00 +24.9% PASS
total/synth/PUSH18/p0 0.00 0.00 +25.6% PASS
total/synth/PUSH18/p1 0.00 0.00 +25.6% PASS
total/synth/PUSH19/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH19/p1 0.00 0.00 +25.1% PASS
total/synth/PUSH2/p0 0.00 0.00 +25.1% PASS
total/synth/PUSH2/p1 0.00 0.00 +25.3% PASS
total/synth/PUSH20/p0 0.00 0.00 +25.5% PASS
total/synth/PUSH20/p1 0.00 0.00 +24.8% PASS
total/synth/PUSH21/p0 0.00 0.00 +25.3% PASS
total/synth/PUSH21/p1 0.00 0.00 +25.5% PASS
total/synth/PUSH22/p0 0.69 0.90 +30.5% PASS
total/synth/PUSH22/p1 0.95 1.17 +23.4% PASS
total/synth/PUSH23/p0 0.69 0.90 +30.9% PASS
total/synth/PUSH23/p1 0.93 1.11 +19.0% PASS
total/synth/PUSH24/p0 0.69 0.91 +32.8% PASS
total/synth/PUSH24/p1 0.95 1.15 +20.6% PASS
total/synth/PUSH25/p0 0.69 0.88 +27.6% PASS
total/synth/PUSH25/p1 0.95 1.11 +16.5% PASS
total/synth/PUSH26/p0 0.72 0.88 +22.1% PASS
total/synth/PUSH26/p1 0.98 1.14 +16.3% PASS
total/synth/PUSH27/p0 0.71 0.89 +24.9% PASS
total/synth/PUSH27/p1 0.94 1.13 +19.9% PASS
total/synth/PUSH28/p0 0.69 0.92 +32.3% PASS
total/synth/PUSH28/p1 0.95 1.17 +23.0% PASS
total/synth/PUSH29/p0 0.72 0.92 +28.9% PASS
total/synth/PUSH29/p1 0.94 1.18 +25.1% PASS
total/synth/PUSH3/p0 0.00 0.00 +25.4% PASS
total/synth/PUSH3/p1 0.00 0.00 +25.3% PASS
total/synth/PUSH30/p0 0.74 0.96 +29.6% PASS
total/synth/PUSH30/p1 0.96 1.18 +23.3% PASS
total/synth/PUSH31/p0 0.72 0.90 +24.6% PASS
total/synth/PUSH31/p1 0.99 1.21 +22.3% PASS
total/synth/PUSH32/p0 0.69 0.95 +37.7% PASS
total/synth/PUSH32/p1 0.95 1.21 +27.5% PASS
total/synth/PUSH4/p0 0.00 0.00 +25.9% PASS
total/synth/PUSH4/p1 0.00 0.00 +25.2% PASS
total/synth/PUSH5/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH5/p1 0.00 0.00 +25.3% PASS
total/synth/PUSH6/p0 0.00 0.00 +25.3% PASS
total/synth/PUSH6/p1 0.00 0.00 +25.5% PASS
total/synth/PUSH7/p0 0.00 0.00 +24.6% PASS
total/synth/PUSH7/p1 0.00 0.00 +25.8% PASS
total/synth/PUSH8/p0 0.00 0.00 +25.4% PASS
total/synth/PUSH8/p1 0.00 0.00 +25.3% PASS
total/synth/PUSH9/p0 0.00 0.00 +25.2% PASS
total/synth/PUSH9/p1 0.00 0.00 +25.3% PASS
total/synth/RETURNDATASIZE/a0 0.02 0.03 +28.7% PASS
total/synth/RETURNDATASIZE/a1 0.02 0.03 +28.7% PASS
total/synth/SAR/b0 0.00 0.00 +25.4% PASS
total/synth/SAR/b1 0.00 0.00 +25.5% PASS
total/synth/SGT/b0 0.00 0.00 +25.3% PASS
total/synth/SGT/b1 0.00 0.00 +25.1% PASS
total/synth/SHL/b0 0.00 0.00 +25.4% PASS
total/synth/SHL/b1 0.00 0.00 +25.6% PASS
total/synth/SHR/b0 0.00 0.00 +25.0% PASS
total/synth/SHR/b1 0.00 0.00 +25.5% PASS
total/synth/SIGNEXTEND/b0 0.00 0.00 +25.4% PASS
total/synth/SIGNEXTEND/b1 0.00 0.00 +25.3% PASS
total/synth/SLT/b0 0.00 0.00 +25.4% PASS
total/synth/SLT/b1 0.00 0.00 +24.9% PASS
total/synth/SUB/b0 0.00 0.00 +25.3% PASS
total/synth/SUB/b1 0.00 0.00 +25.4% PASS
total/synth/SWAP1/s0 0.00 0.00 +25.3% PASS
total/synth/SWAP10/s0 0.00 0.00 +25.2% PASS
total/synth/SWAP11/s0 0.00 0.00 +25.4% PASS
total/synth/SWAP12/s0 0.00 0.00 +25.8% PASS
total/synth/SWAP13/s0 0.00 0.00 +25.4% PASS
total/synth/SWAP14/s0 0.00 0.00 +25.6% PASS
total/synth/SWAP15/s0 0.00 0.00 +25.7% PASS
total/synth/SWAP16/s0 0.00 0.00 +25.6% PASS
total/synth/SWAP2/s0 0.00 0.00 +25.4% PASS
total/synth/SWAP3/s0 0.00 0.00 +25.6% PASS
total/synth/SWAP4/s0 0.00 0.00 +25.2% PASS
total/synth/SWAP5/s0 0.00 0.00 +25.4% PASS
total/synth/SWAP6/s0 0.00 0.00 +25.7% PASS
total/synth/SWAP7/s0 0.00 0.00 +25.4% PASS
total/synth/SWAP8/s0 0.00 0.00 +25.6% PASS
total/synth/SWAP9/s0 0.00 0.00 +25.7% PASS
total/synth/XOR/b0 0.00 0.00 +25.5% PASS
total/synth/XOR/b1 0.00 0.00 +25.3% PASS
total/synth/loop_v1 0.95 1.20 +26.9% PASS
total/synth/loop_v2 0.88 1.11 +25.6% PASS

Summary: 194 benchmarks, 1 regressions


@ys8888john ys8888john force-pushed the feat/extend-const-precheck-coverage branch from 10d3724 to 36c6c38 Compare May 6, 2026 10:09
@ys8888john ys8888john force-pushed the feat/extend-const-precheck-coverage branch from 36c6c38 to 2f99a8f Compare May 6, 2026 10:11
@zoowii zoowii requested a review from Copilot May 7, 2026 03:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the EVM bytecode visitor’s const direct-memory precheck analysis by adding a 256-entry “opaque” opcode stack-effect table, allowing more non-memory-mutating opcodes to be simulated (instead of immediately rejecting the precheck plan). It also changes MSIZE handling to conservatively bail out to avoid semantic mismatches when memory-expansion is pre-applied.

Changes:

  • Add PrecheckOpaqueStackEffect + buildPrecheckOpaqueStackEffectTable() to model stack deltas for additional opcodes in the const-precheck simulator’s fallback path.
  • Update const-precheck simulation default: handling to use the new table rather than unconditionally bailing.
  • Change OP_MSIZE handling in const-precheck simulation to hard-bail to avoid incorrect observed memory size.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1740 to +1746
static constexpr auto OpaqueEffects =
buildPrecheckOpaqueStackEffectTable();
const PrecheckOpaqueStackEffect &Eff =
OpaqueEffects[static_cast<uint8_t>(Opcode)];
if (Eff.Pops == kPrecheckBailSentinel) {
return {};
}
Comment on lines 1729 to +1734
case OP_MSIZE:
SimStack.push_back(makeUnknownConstU64());
break;
default:
// MSIZE observes the precise memory size at the moment it executes.
// Hoisting expandMemoryIR to the BB entry would expand memory ahead
// of MSIZE and pollute its observed value, breaking EVM semantics
// (state root mismatch in vmIOandFlowOperations.msize). Hard-bail.
return {};
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