Run yul optimizer until it has no effect anymore.

This commit is contained in:
chriseth
2019-03-05 20:30:13 +01:00
parent 40171c216d
commit f35694f655
3 changed files with 22 additions and 4 deletions
+8 -1
View File
@@ -52,9 +52,16 @@ size_t CodeSize::codeSize(Block const& _block)
return cs.m_size;
}
size_t CodeSize::codeSizeIncludingFunctions(Block const& _block)
{
CodeSize cs(false);
cs(_block);
return cs.m_size;
}
void CodeSize::visit(Statement const& _statement)
{
if (_statement.type() == typeid(FunctionDefinition))
if (_statement.type() == typeid(FunctionDefinition) && m_ignoreFunctions)
return;
else if (!(
_statement.type() == typeid(Block) ||