Merge pull request #8151 from ethereum/fixYulOptSetting

Only activate Yul optimizer if ``--optimize`` is given.
This commit is contained in:
chriseth 2020-01-16 11:26:38 +01:00 committed by GitHub
commit 3d4a2219a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ Compiler Features:
* Yul Optimizer: Apply penalty when trying to rematerialize into loops.
Bugfixes:
* Commandline interface: Only activate yul optimizer if ``--optimize`` is given.
Build System:
* Switch to building soljson.js with an embedded base64-encoded wasm binary.

View File

@ -1113,7 +1113,8 @@ bool CommandLineInterface::processInput()
OptimiserSettings settings = m_args.count(g_argOptimize) ? OptimiserSettings::standard() : OptimiserSettings::minimal();
settings.expectedExecutionsPerDeployment = m_args[g_argOptimizeRuns].as<unsigned>();
settings.runYulOptimiser = !m_args.count(g_strNoOptimizeYul);
if (m_args.count(g_strNoOptimizeYul))
settings.runYulOptimiser = false;
settings.optimizeStackAllocation = settings.runYulOptimiser;
m_compiler->setOptimiserSettings(settings);