Avatar for the paradigmxyz user
paradigmxyz
revmc
BlogDocsChangelog

Performance History

Latest Results

feat(dse): precise liveness for DUPN, SWAPN, EXCHANGE Handle the EOF stack opcodes with exact liveness transfer instead of falling through to the conservative generic path. SWAPN permutes two positions (like SWAP1-16), DUPN copies a deep source to TOS (like DUP1-16), and EXCHANGE swaps two arbitrary non-TOS positions. Also make BlockData::insts() return DoubleEndedIterator so the backward walk can use block.insts().enumerate().rev() instead of manual range reversal.
dani/dead-store-elim
7 hours ago
Merge branch 'main' into dani/dead-store-elim
dani/dead-store-elim
8 hours ago
perf: constant propagation from abstract interpretation to codegen (#239) ## Summary Uses the operand snapshots from block analysis to optimize codegen in two ways: **Const operand elision (inputs):** When `popn`/`dup`/`swap` encounter a stack operand whose value is known at compile time, emit an `iconst_256` instead of loading from the stack. This eliminates redundant loads when the value was pushed by an earlier instruction. **Const output folding:** When an instruction's output is a known constant (via abstract interpretation + constant folding) and the opcode is pure with static gas, skip the opcode logic entirely — just write the folded constant to the output slot. This turns sequences like `PUSH 3, PUSH 4, ADD` into a single store of `7`. **Suspect-block snapshot preservation:** When unresolved Top jumps trigger suspect-block invalidation, snapshots are now restored from the block-local pass instead of being cleared entirely. Block-local constants (PUSHes, const-folded arithmetic) don't depend on the incoming stack state and are always valid, so they should survive invalidation. Also includes: - Section-relative GEPs for stack pointer computation - `InstFlags::STACK_SECTION_HEAD` extraction - Invalidation of operand snapshots in suspect blocks (unsound due to unresolved Top jumps) - Stack invalidation after suspending instructions (CALL/CREATE) ## Stats (vs main) ``` benchmark unopt.ll opt.ll opt.s main→pr main→pr main→pr ---------------------------------------------------------- fibonacci -5 -1.5% = +0.0% = +0.0% fibonacci-calldata -5 -1.2% = +0.0% = +0.0% factorial -6 -1.5% = +0.0% = +0.0% counter -51 -3.9% -15 -3.2% -27 -3.1% snailtracer -2065 -3.2% -166 -0.6% +80 +0.2% weth -737 -4.4% -163 -2.9% -571 -6.1% hash_10k -37 -3.1% -5 -1.2% +6 +0.7% erc20_transfer -611 -3.6% -72 -1.0% -89 -0.8% push0_proxy -1 -0.3% = +0.0% = +0.0% usdc_proxy -337 -3.8% -67 -1.9% -113 -2.0% fiat_token -3554 -3.6% -345 -1.0% -258 -0.4% uniswap_v2_pair -2094 -3.8% -297 -1.5% -15 -0.0% univ2_router -3535 -3.5% -343 -0.9% -41 -0.1% seaport -4727 -3.0% -529 -0.8% -298 -0.3% airdrop -1714 -5.0% -97 -0.7% -66 -0.3% bswap64 -231 -7.9% -124 -13.9% -208 -11.0% bswap64_opt -109 -4.6% -24 -3.6% -65 -5.2% eip4788 -13 -1.8% = +0.0% = +0.0% eip2935 -16 -2.5% -7 -2.8% -18 -3.4% ---------------------------------------------------------- TOTAL -19848 -3.5% -2254 -1.0% -1683 -0.5% ```
main
8 hours ago
fmt
dani/const-snapshot
9 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
feat: intra-block dead store elimination#241
8 hours ago
d5b2af7
dani/dead-store-elim
CodSpeed Performance Gauge
0%
8 hours ago
4852491
dani/codegen-tests
CodSpeed Performance Gauge
+18%
perf: constant propagation from abstract interpretation to codegen#239
9 hours ago
f8b1c64
dani/const-snapshot
© 2026 CodSpeed Technology
Home Terms Privacy Docs