~/talk

How to solve stack too deep errors: a Yul to EVM pipeline

Talkat Solidity Summit 2025 · on Tuesday, 2025-11-18· [compilers-and-language-design]
links:none on file
slides:none on file

A Yul-to-EVM pipeline builds on SSA-CFG to compute top‑down stack layouts, emits a greedy code generator that inserts virtual get annotations when values exceed the accessible stack depth, and then repairs them by spilling to the Solidity free memory pointer region. The standalone Python tool handles all stack-too-deep cases in the Solidity benchmark suite, survives an artificial limit of depth 8, runs as linear passes over the CFG, and reports fewer instructions/bytes and estimated gas in the evaluated contracts.

AI-written summary · about

  1. 0:00Stack too deep errors
  2. 1:48EVM stack-based design
  3. 3:57Memory as registers in Solidity
  4. 4:38Yul to EVM pipeline
  5. 6:25Dual CFG in SSA form
  6. 7:27Liveness analysis under SSA
  7. 8:32Stack layouts top-down
  8. 10:00Stack contents across blocks
  9. 12:10Greedy code generation
  10. 13:52Repairing unreachable stack accesses
  11. 14:54Φ-functions for spilling
  12. 16:41Spilled variables decision
  13. 18:08Virtual gets to memory loads
  14. 18:51Implementation setup
  15. 19:12Benchmark results and gas savings
  16. 20:39Restricted stack access depth
  17. 21:01Pipeline phase performance
  18. 21:46Pipeline vs Solidity compiler
  19. 22:27Dual CFG limitations
  20. 23:10Future improvements
  21. 24:12Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.