data flow: perfomance improvement

This commit is contained in:
2024-04-07 19:06:33 +03:00
parent 9bc4fa246c
commit 494a705930

View File

@@ -33,23 +33,21 @@ void DataFlowAnalysisNode<DataType>::doStep()
{
if (in_cnt < next->out_cnt)
{
for (const auto& byOut : next->getOut())
{
bool inserted = addIn({ byOut });
const auto& byOut = next->getOut();
bool inserted = addIn( byOut);
if (inserted)
{
if (next->out_cnt > in_max_cnt)
in_max_cnt = next->out_cnt;
inserted = forwardData({ byOut });
inserted = forwardData(byOut);
if (inserted && next->out_cnt > out_max_cnt)
out_max_cnt = next->out_cnt;
}
}
}
}
uniq_change |= (out_cnt == CNT_NOTINIT);