mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Changelog and docs
This commit is contained in:
@@ -329,11 +329,15 @@ the ``--yul-optimizations`` option:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul'
|
||||
solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul:fDnTOc'
|
||||
|
||||
The sequence inside ``[...]`` will be applied multiple times in a loop until the Yul code
|
||||
remains unchanged or until the maximum number of rounds (currently 12) has been reached.
|
||||
|
||||
The colon delimiter ``:`` is used to supply a custom clean up sequence in order to replace the
|
||||
default (``fDnTOc``) one, which is run after the stack compressor when using the legacy EVM
|
||||
code transform.
|
||||
|
||||
Available abbreviations are listed in the :ref:`Yul optimizer docs <optimization-step-sequence>`.
|
||||
|
||||
Preprocessing
|
||||
|
||||
+7
-1
@@ -1250,7 +1250,7 @@ You can override this sequence and supply your own using the ``--yul-optimizatio
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul'
|
||||
solc --optimize --ir-optimized --yul-optimizations 'dhfoD[xarrscLMcCTU]uljmul:fDnTOc'
|
||||
|
||||
The order of steps is significant and affects the quality of the output.
|
||||
Moreover, applying a step may uncover new optimization opportunities for others that were already
|
||||
@@ -1259,6 +1259,12 @@ By enclosing part of the sequence in square brackets (``[]``) you tell the optim
|
||||
apply that part until it no longer improves the size of the resulting assembly.
|
||||
You can use brackets multiple times in a single sequence but they cannot be nested.
|
||||
|
||||
The colon delimiter (``:``) in the example is used to specify a custom cleanup sequence, which is run after
|
||||
the main part of the sequence before the delimiter (and, when using the legacy EVM code transform,
|
||||
only *after* the stack compressor). If no such delimiter is present, the default cleanup sequence (``fDnTOc``)
|
||||
is run after the supplied sequence.
|
||||
|
||||
|
||||
The following optimization steps are available:
|
||||
|
||||
============ ===============================
|
||||
|
||||
Reference in New Issue
Block a user