diff options
Diffstat (limited to 'libyul/optimiser/SimplificationRules.h')
-rw-r--r-- | libyul/optimiser/SimplificationRules.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libyul/optimiser/SimplificationRules.h b/libyul/optimiser/SimplificationRules.h index 25d91573..82ae5d22 100644 --- a/libyul/optimiser/SimplificationRules.h +++ b/libyul/optimiser/SimplificationRules.h @@ -49,7 +49,11 @@ public: /// @returns a pointer to the first matching pattern and sets the match /// groups accordingly. - static SimplificationRule<Pattern> const* findFirstMatch(Expression const& _expr); + /// @param _ssaValues values of variables that are assigned exactly once. + static SimplificationRule<Pattern> const* findFirstMatch( + Expression const& _expr, + std::map<std::string, Expression const*> const& _ssaValues + ); /// Checks whether the rulelist is non-empty. This is usually enforced /// by the constructor, but we had some issues with static initialization. @@ -92,7 +96,7 @@ public: /// same expression equivalence class. void setMatchGroup(unsigned _group, std::map<unsigned, Expression const*>& _matchGroups); unsigned matchGroup() const { return m_matchGroup; } - bool matches(Expression const& _expr) const; + bool matches(Expression const& _expr, std::map<std::string, Expression const*> const& _ssaValues) const; std::vector<Pattern> arguments() const { return m_arguments; } |