Merge pull request #5676 from ethereum/someOpts

Make swappable instructions static.
This commit is contained in:
Alex Beregszaszi 2018-12-18 14:03:50 +00:00 committed by GitHub
commit a51a8368aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ struct SwapComparison: SimplePeepholeOptimizerMethod<SwapComparison, 2>
{ {
static bool applySimple(AssemblyItem const& _swap, AssemblyItem const& _op, std::back_insert_iterator<AssemblyItems> _out) static bool applySimple(AssemblyItem const& _swap, AssemblyItem const& _op, std::back_insert_iterator<AssemblyItems> _out)
{ {
map<Instruction, Instruction> swappableOps{ static map<Instruction, Instruction> const swappableOps{
{ Instruction::LT, Instruction::GT }, { Instruction::LT, Instruction::GT },
{ Instruction::GT, Instruction::LT }, { Instruction::GT, Instruction::LT },
{ Instruction::SLT, Instruction::SGT }, { Instruction::SLT, Instruction::SGT },