Yul Optimizer: Remove dead code

This commit is contained in:
Mathias Baumann
2019-04-01 17:16:04 +02:00
parent e7340f2126
commit e20acf5d0a
21 changed files with 482 additions and 3 deletions
+16
View File
@@ -132,6 +132,22 @@ bool SemanticInformation::altersControlFlow(AssemblyItem const& _item)
}
}
bool SemanticInformation::terminatesControlFlow(AssemblyItem const& _item)
{
if (_item.type() != Operation)
return false;
switch (_item.instruction())
{
case Instruction::RETURN:
case Instruction::SELFDESTRUCT:
case Instruction::STOP:
case Instruction::INVALID:
case Instruction::REVERT:
return true;
default:
return false;
}
}
bool SemanticInformation::isDeterministic(AssemblyItem const& _item)
{