mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11717 from jaa2/develop
Handle --optimize-runs option in assembly mode
This commit is contained in:
@@ -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
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user