Further fixes to the optimizer.

This commit is contained in:
chriseth
2016-08-01 23:41:11 +02:00
parent fb90e8876f
commit c0afb4549e
3 changed files with 9 additions and 5 deletions
+4 -3
View File
@@ -250,10 +250,11 @@ void ControlFlowGraph::gatherKnowledge()
KnownStatePointer state = item.state;
if (block.startState)
{
if (m_joinKnowledge)
state->reduceToCommonKnowledge(*block.startState, !item.blocksSeen.count(item.blockId));
else
// We call reduceToCommonKnowledge even in the non-join setting to get the correct
// sequence number
if (!m_joinKnowledge)
state->reset();
state->reduceToCommonKnowledge(*block.startState, !item.blocksSeen.count(item.blockId));
if (*state == *block.startState)
continue;
}
+1 -1
View File
@@ -116,7 +116,7 @@ private:
unsigned m_lastUsedId = 0;
AssemblyItems const& m_items;
bool m_joinKnowledge;
bool m_joinKnowledge = true;
std::map<BlockId, BasicBlock> m_blocks;
};