mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tune Rematerializer
This commit is contained in:
@@ -110,6 +110,8 @@ protected:
|
||||
/// for example at points where control flow is merged.
|
||||
void clearValues(std::set<YulString> _names);
|
||||
|
||||
void assignValue(YulString _variable, Expression const* _value);
|
||||
|
||||
/// Clears knowledge about storage or memory if they may be modified inside the block.
|
||||
void clearKnowledgeIfInvalidated(Block const& _block);
|
||||
|
||||
@@ -144,6 +146,8 @@ protected:
|
||||
|
||||
/// Current values of variables, always movable.
|
||||
std::map<YulString, Expression const*> m_value;
|
||||
/// The loop nesting depth of the definition of variables (those used in m_value).
|
||||
std::map<YulString, size_t> m_variableLoopDepth;
|
||||
/// m_references.forward[a].contains(b) <=> the current expression assigned to a references b
|
||||
/// m_references.backward[b].contains(a) <=> the current expression assigned to a references b
|
||||
InvertibleRelation<YulString> m_references;
|
||||
@@ -153,6 +157,9 @@ protected:
|
||||
|
||||
KnowledgeBase m_knowledgeBase;
|
||||
|
||||
/// Current nesting depth of loops.
|
||||
size_t m_loopDepth{0};
|
||||
|
||||
struct Scope
|
||||
{
|
||||
explicit Scope(bool _isFunction): isFunction(_isFunction) {}
|
||||
|
||||
Reference in New Issue
Block a user