12 l->
fOrder = order; V[order].insert(l);
20 for (lset::const_iterator p = T1.begin(); p!=T1.end(); p++) {
22 T2.insert((*p)->fBackwardLoopDependencies.begin(), (*p)->fBackwardLoopDependencies.end());
45 T1.insert(root); level=0; V.clear();
48 T1=T2; T2.clear(); level++;
49 }
while (T1.size()>0);
52 lgraph::iterator p = V.begin();
53 while (p != V.end()) {
54 if ((*p).size() == 1 && (*(*p).begin())->isEmpty()) {
static void setLevel(int order, const lset &T1, lset &T2, lgraph &V)
Set the order of T1's loops and collect there sons into T2.
static void resetOrder(Loop *l)
static void setOrder(Loop *l, int order, lgraph &V)
Set the order of a loop and place it to appropriate set.
void sortGraph(Loop *root, lgraph &V)
Topological sort of an acyclic graph of loops.
int fOrder
used during topological sort
set< Loop * > fBackwardLoopDependencies
Loops that must be computed before this one.