mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
yul: Add new optimizer rules for create and create2 builtins
This commit is contained in:
@@ -97,15 +97,19 @@ SimplificationRules::SimplificationRules()
|
||||
Pattern B(PatternKind::Constant);
|
||||
Pattern C(PatternKind::Constant);
|
||||
// Anything.
|
||||
Pattern W;
|
||||
Pattern X;
|
||||
Pattern Y;
|
||||
Pattern Z;
|
||||
A.setMatchGroup(1, m_matchGroups);
|
||||
B.setMatchGroup(2, m_matchGroups);
|
||||
C.setMatchGroup(3, m_matchGroups);
|
||||
X.setMatchGroup(4, m_matchGroups);
|
||||
Y.setMatchGroup(5, m_matchGroups);
|
||||
W.setMatchGroup(4, m_matchGroups);
|
||||
X.setMatchGroup(5, m_matchGroups);
|
||||
Y.setMatchGroup(6, m_matchGroups);
|
||||
Z.setMatchGroup(7, m_matchGroups);
|
||||
|
||||
addRules(simplificationRuleList(A, B, C, X, Y));
|
||||
addRules(simplificationRuleList(A, B, C, W, X, Y, Z));
|
||||
assertThrow(isInitialized(), OptimizerException, "Rule list not properly initialized.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user