void BoundFactsCalculator::ReverseDFS(Node::Ptr cur) { nodeColor[cur] = 1; analysisOrder[cur] = orderStamp; NodeIterator nbegin, nend; cur->ins(nbegin, nend); for (; nbegin != nend; ++nbegin) if (nodeColor.find(*nbegin) == nodeColor.end()) ReverseDFS(*nbegin); }
bool BoundFactsCalculator::HasIncomingEdgesFromLowerLevel(int curOrder, vector<Node::Ptr>& curNodes) { for (auto nit = curNodes.begin(); nit != curNodes.end(); ++nit) { Node::Ptr cur = *nit; NodeIterator nbegin, nend; cur->ins(nbegin, nend); for (; nbegin != nend; ++nbegin) if (analysisOrder[*nbegin] < curOrder) return true; } return false; }