CommandLineParser: Handle --optimize-runs option in assembly mode

Fixes #11708.
This commit is contained in:
jaa2
2021-07-29 18:15:57 +02:00
committed by hrkrshnn
parent 1794e1c837
commit c627e6af10
12 changed files with 88 additions and 5 deletions
+2
View File
@@ -49,6 +49,8 @@ differences, for example, functions may be inlined, combined, or rewritten to el
redundancies, etc. (compare the output between the flags ``--ir`` and
``--optimize --ir-optimized``).
.. _optimizer-parameter-runs:
Optimizer Parameter Runs
========================
+4 -2
View File
@@ -1177,11 +1177,13 @@ intermediate states. This allows for easy debugging and verification of the opti
Please refer to the general :ref:`optimizer documentation <optimizer>`
for more details about the different optimization stages and how to use the optimizer.
If you want to use Solidity in stand-alone Yul mode, you activate the optimizer using ``--optimize``:
If you want to use Solidity in stand-alone Yul mode, you activate the optimizer using ``--optimize``
and optionally specify the :ref:`expected number of contract executions <optimizer-parameter-runs>` with
``--optimize-runs``:
.. code-block:: sh
solc --strict-assembly --optimize
solc --strict-assembly --optimize --optimize-runs 200
In Solidity mode, the Yul optimizer is activated together with the regular optimizer.