Improve documentation on Yul standard cleanup sequence
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
This issue is based on a Twitter discussion with @leonardoalt. IMHO it would be very valuable to document what sequence is run if `optimizerSteps = ''` is set. Based on my analysis [here](https://twitter.com/pcaversaccio/status/1604192588352798723), the default Yul cleanup sequence is (which is only documented in the source code currently):
- BlockFlattener (`f`)
- DeadCodeEliminator (`D`)
- ControlFlowSimplifier (`n`)
- LiteralRematerialiser (`T`)
- ForLoopConditionOutOfBody (`O`)
- CommonSubexpressionEliminator (`c`)
But further things are actually run (see [here](https://twitter.com/leonardoalt/status/1604214614853668865)). There is further information as pointed out by @leonardoalt [here](https://twitter.com/leonardoalt/status/1604258182360186880), but still not clear what exactly is run in the case `optimizerSteps = ''`. Having a small section on this topic that clarifies everything would be highly valuable since the optimiser itself & its optimiser steps are already extremely complex.
Contributor guide
Research direction
The issue points to the optimizer source code and linked Twitter analyses; start by tracing the Yul cleanup sequence used when optimizerSteps = ''. Document the complete sequence, including the steps beyond the listed six, in a small documentation section, and verify that it matches the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100