diff options
author | chriseth <chris@ethereum.org> | 2018-10-03 00:07:50 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-16 22:18:39 +0800 |
commit | a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf (patch) | |
tree | 8978c38d55a7781aae5ad44901e422c666edfa91 /libyul/optimiser/SimplificationRules.h | |
parent | 76db0d69cfba634bdc5f6da41dc30c2abdb66bc2 (diff) | |
download | dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar.gz dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar.bz2 dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar.lz dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar.xz dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.tar.zst dexon-solidity-a320eec7d38f98a1fbb9f6267e5e30cfae5c59cf.zip |
New simplifier via broken expressions.
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; } |