perf(compiler): extend x86 cg peephole rules#437
Conversation
⚡ Performance Regression Check Results✅ Performance Check Passed (interpreter)Performance Benchmark Results (threshold: 25%)
Summary: 194 benchmarks, 0 regressions ✅ Performance Check Passed (multipass)Performance Benchmark Results (threshold: 25%)
Summary: 194 benchmarks, 0 regressions |
5c5941f to
a30d58d
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add comments for intentional design decisions (ZeroToErase asymmetry, TEST dual-trigger, NoOpImm whitelist) - Use SmallVector for small peephole collections to avoid heap allocs - Add function-level pattern descriptions for complex match functions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- matchDirectBoolBranch: note optional or-with-zero and direct self-test path - matchCmovBoolBranch: note order-independent mov defs, cmp/test output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a30d58d to
3f4c8c4
Compare
|
Closing in favor of PR #439 ( Both PRs branched from the same main commit and both touch The 988-line implementation from this branch was already ported to the |
Summary
src/compiler/target/x86/x86_cg_peephole.cppand.hValidation
tools/format.sh check./build/evmStateTests --gtest_brief=1Benchmark
Latest reliable local
external/totalcomparison against the previous stable candidate:1.069xmain/*:1.023xmicro/*:1.012xsynth/*:1.078xLargest wins in that run:
external/total/synth/GAS/a0,a1: about2.36xto2.41xexternal/total/micro/memory_grow_mstore/by32: about1.82xexternal/total/micro/memory_grow_mload/by32: about1.55xKnown regressions remain concentrated in a small set of micro cases:
memory_grow_mload/nogrowmemory_grow_mload/by1memory_grow_mstore/nogrowmemory_grow_mstore/by1memory_grow_mstore/by16jump_around/loop_with_many_jumpdests/signextendcases