From 233604f94bc3a21f3a565c781c2f5b581a64bcfc Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 14 Sep 2020 14:47:06 +0200 Subject: [PATCH] Remove ineffective rules. --- libevmasm/RuleList.h | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/libevmasm/RuleList.h b/libevmasm/RuleList.h index b2f63933f..4adeb34c9 100644 --- a/libevmasm/RuleList.h +++ b/libevmasm/RuleList.h @@ -608,45 +608,6 @@ std::vector> simplificationRuleListPart8( return rules; } -template -std::vector> simplificationRuleListPart9( - Pattern, - Pattern, - Pattern, - Pattern W, - Pattern X, - Pattern Y, - Pattern Z -) -{ - using Word = typename Pattern::Word; - using Builtins = typename Pattern::Builtins; - std::vector> rules; - - assertThrow(Pattern::WordSize > 160, OptimizerException, ""); - Word const mask = (Word(1) << 160) - 1; - // CREATE - rules.push_back({ - Builtins::AND(Builtins::CREATE(W, X, Y), mask), - [=]() -> Pattern { return Builtins::CREATE(W, X, Y); } - }); - rules.push_back({ - Builtins::AND(mask, Builtins::CREATE(W, X, Y)), - [=]() -> Pattern { return Builtins::CREATE(W, X, Y); } - }); - // CREATE2 - rules.push_back({ - Builtins::AND(Builtins::CREATE2(W, X, Y, Z), mask), - [=]() -> Pattern { return Builtins::CREATE2(W, X, Y, Z); } - }); - rules.push_back({ - Builtins::AND(mask, Builtins::CREATE2(W, X, Y, Z)), - [=]() -> Pattern { return Builtins::CREATE2(W, X, Y, Z); } - }); - - return rules; -} - template std::vector> evmRuleList( langutil::EVMVersion _evmVersion, @@ -705,7 +666,6 @@ std::vector> simplificationRuleList( rules += simplificationRuleListPart6(A, B, C, W, X); rules += simplificationRuleListPart7(A, B, C, W, X); rules += simplificationRuleListPart8(A, B, C, W, X); - rules += simplificationRuleListPart9(A, B, C, W, X, Y, Z); if (_evmVersion.has_value()) rules += evmRuleList(*_evmVersion, A, B, C, W, X, Y, Z);