aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/ControlFlowGraph.cpp
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.cpp
parentac0d1388008ed616ab7b35a5b3a27e7400decd46 (diff)
downloaddexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.gz
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.bz2
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.lz
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.xz
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.tar.zst
dexon-solidity-93ebaa4822571cd0a83906b4665f34c34d2343f7.zip
Reset knowledge in optimizer for path joins.
Diffstat (limited to 'libevmasm/ControlFlowGraph.cpp')
-rw-r--r--libevmasm/ControlFlowGraph.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libevmasm/ControlFlowGraph.cpp b/libevmasm/ControlFlowGraph.cpp
index fc2144c7..61b24e4b 100644
--- a/libevmasm/ControlFlowGraph.cpp
+++ b/libevmasm/ControlFlowGraph.cpp
@@ -250,7 +250,10 @@ void ControlFlowGraph::gatherKnowledge()
KnownStatePointer state = item.state;
if (block.startState)
{
- state->reduceToCommonKnowledge(*block.startState, !item.blocksSeen.count(item.blockId));
+ if (m_joinKnowledge)
+ state->reduceToCommonKnowledge(*block.startState, !item.blocksSeen.count(item.blockId));
+ else
+ state->reset();
if (*state == *block.startState)
continue;
}