mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Pass "optimize stack allocation" flag down to the stack compressor.
This commit is contained in:
@@ -39,7 +39,7 @@ string check(string const& _input)
|
||||
{
|
||||
shared_ptr<Block> ast = yul::test::parse(_input, false).first;
|
||||
BOOST_REQUIRE(ast);
|
||||
map<YulString, int> functions = CompilabilityChecker::run(EVMDialect::strictAssemblyForEVM(dev::test::Options::get().evmVersion()), *ast);
|
||||
map<YulString, int> functions = CompilabilityChecker::run(EVMDialect::strictAssemblyForEVM(dev::test::Options::get().evmVersion()), *ast, true);
|
||||
string out;
|
||||
for (auto const& function: functions)
|
||||
out += function.first.str() + ": " + to_string(function.second) + " ";
|
||||
|
||||
@@ -247,11 +247,11 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
|
||||
{
|
||||
disambiguate();
|
||||
(FunctionGrouper{})(*m_ast);
|
||||
StackCompressor::run(m_dialect, *m_ast);
|
||||
StackCompressor::run(m_dialect, *m_ast, true);
|
||||
(BlockFlattener{})(*m_ast);
|
||||
}
|
||||
else if (m_optimizerStep == "fullSuite")
|
||||
OptimiserSuite::run(m_dialect, *m_ast, *m_analysisInfo);
|
||||
OptimiserSuite::run(m_dialect, *m_ast, *m_analysisInfo, true);
|
||||
else
|
||||
{
|
||||
AnsiColorized(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Invalid optimizer step: " << m_optimizerStep << endl;
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
SSAReverser::run(*m_ast);
|
||||
break;
|
||||
case 'p':
|
||||
StackCompressor::run(m_dialect, *m_ast);
|
||||
StackCompressor::run(m_dialect, *m_ast, true);
|
||||
break;
|
||||
default:
|
||||
cout << "Unknown option." << endl;
|
||||
|
||||
Reference in New Issue
Block a user