mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 00:47:07 +00:00
[LCG] Remove a completely unnecessary loop. It wasn't even doing any
thing, just mucking up the code. I feel bad that I even wrote this loop. Very sorry. The diff is huge because of the indent change, but I promise all this is doing is realizing that the outer two loops were actually the exact same loops, and we didn't need two of them. llvm-svn: 207202
This commit is contained in:
parent
6a4aae8f97
commit
a937a4a8a9
@ -218,15 +218,12 @@ LazyCallGraph::SCC::removeInternalEdge(LazyCallGraph &G, Node &Caller,
|
||||
"pending nodes from a prior walk.");
|
||||
}
|
||||
|
||||
// We simulate recursion by popping out of all the nested loops and
|
||||
// continuing.
|
||||
bool Recurse = false;
|
||||
|
||||
do {
|
||||
Node *N = DFSStack.back().first;
|
||||
assert(N->DFSNumber != 0 && "We should always assign a DFS number "
|
||||
"before placing a node onto the stack.");
|
||||
|
||||
// We simulate recursion by popping out of the nested loop and continuing.
|
||||
bool Recurse = false;
|
||||
for (auto I = DFSStack.back().second, E = N->end(); I != E; ++I) {
|
||||
Node &ChildN = *I;
|
||||
// If this child isn't currently in this SCC, no need to process it.
|
||||
@ -270,14 +267,14 @@ LazyCallGraph::SCC::removeInternalEdge(LazyCallGraph &G, Node &Caller,
|
||||
N->LowLink = ChildN.LowLink;
|
||||
}
|
||||
if (Recurse)
|
||||
break;
|
||||
continue;
|
||||
|
||||
// No more children to process, pop it off the core DFS stack.
|
||||
DFSStack.pop_back();
|
||||
|
||||
if (N->LowLink == N->DFSNumber) {
|
||||
ResultSCCs.push_back(G.formSCC(N, PendingSCCStack));
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(!DFSStack.empty() && "We shouldn't have an empty stack!");
|
||||
@ -288,9 +285,6 @@ LazyCallGraph::SCC::removeInternalEdge(LazyCallGraph &G, Node &Caller,
|
||||
// low-link == dfs-number and pops it off as well. Move it to the pending
|
||||
// stack which is pulled into the next SCC to be formed.
|
||||
PendingSCCStack.push_back(N);
|
||||
} while (!DFSStack.empty());
|
||||
|
||||
// We reach here when we're going to "recurse".
|
||||
}
|
||||
|
||||
// Replace this SCC with the NewNodes we collected above.
|
||||
|
Loading…
Reference in New Issue
Block a user