aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/ControlFlowGraph.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-07-29 17:47:26 +0800
committerchriseth <c@ethdev.com>2016-08-01 21:30:21 +0800
commit93ebaa4822571cd0a83906b4665f34c34d2343f7 (patch)
treef21ccd12387bdef2982fc375a96b80656ef4d8b1 /libevmasm/ControlFlowGraph.h
parentac0d1388008ed616ab7b35a5b3a27e7400decd46 (diff)
downloaddexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.gz
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.zst
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.zip
Reset knowledge in optimizer for path joins.
Diffstat (limited to 'libevmasm/ControlFlowGraph.h')
-rw-r--r--libevmasm/ControlFlowGraph.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libevmasm/ControlFlowGraph.h b/libevmasm/ControlFlowGraph.h
index 4480ba49..a6a9df8e 100644
--- a/libevmasm/ControlFlowGraph.h
+++ b/libevmasm/ControlFlowGraph.h
@@ -94,7 +94,11 @@ class ControlFlowGraph
public:
/// Initializes the control flow graph.
/// @a _items has to persist across the usage of this class.
- ControlFlowGraph(AssemblyItems const& _items): m_items(_items) {}
+ /// @a _joinKnowledge if true, reduces state knowledge to common base at the join of two paths
+ explicit ControlFlowGraph(AssemblyItems const& _items, bool _joinKnowledge = true):
+ m_items(_items),
+ m_joinKnowledge(_joinKnowledge)
+ {}
/// @returns vector of basic blocks in the order they should be used in the final code.
/// Should be called only once.
BasicBlocks optimisedBlocks();
@@ -112,6 +116,7 @@ private:
unsigned m_lastUsedId = 0;
AssemblyItems const& m_items;
+ bool m_joinKnowledge;
std::map<BlockId, BasicBlock> m_blocks;
};