Pass "optimize stack allocation" flag down to the stack compressor.

This commit is contained in:
chriseth
2019-03-20 15:03:27 +01:00
parent 556d11dae0
commit 38cbf8d230
11 changed files with 27 additions and 14 deletions
+2 -1
View File
@@ -59,6 +59,7 @@ void OptimiserSuite::run(
shared_ptr<Dialect> const& _dialect,
Block& _ast,
AsmAnalysisInfo const& _analysisInfo,
bool _optimizeStackAllocation,
set<YulString> const& _externallyUsedIdentifiers
)
{
@@ -185,7 +186,7 @@ void OptimiserSuite::run(
UnusedPruner::runUntilStabilised(*_dialect, ast, reservedIdentifiers);
FunctionGrouper{}(ast);
StackCompressor::run(_dialect, ast);
solAssert(StackCompressor::run(_dialect, ast, _optimizeStackAllocation), "");
BlockFlattener{}(ast);
VarNameCleaner{ast, *_dialect, reservedIdentifiers}(ast);