Pull out the variable query.

This commit is contained in:
chriseth 2022-12-19 15:00:24 +01:00
parent 11e7c5e813
commit c85a1058f6

View File

@ -134,13 +134,15 @@ void UnusedAssignEliminator::shortcutNestedLoop(ActiveStores const& _zeroRuns)
// they will be joined later anyway.
for (auto& [variable, stores]: m_activeStores)
{
auto zeroIt = _zeroRuns.find(variable);
for (auto& assignment: stores)
{
auto zeroIt = _zeroRuns.find(variable);
if (zeroIt != _zeroRuns.end() && zeroIt->second.count(assignment))
continue;
m_usedStores.insert(assignment);
}
}
}
void UnusedAssignEliminator::finalizeFunctionDefinition(FunctionDefinition const& _functionDefinition)