-/* Connect the superblocks into linear sequence. At the moment we attempt to keep
- the original order as much as possible, but the algorithm may be made smarter
- later if needed. BB reordering pass should void most of the benefits of such
- change though. */
-
-static void
-layout_superblocks (void)
-{
- basic_block end = EDGE_SUCC (ENTRY_BLOCK_PTR, 0)->dest;
- basic_block bb = EDGE_SUCC (ENTRY_BLOCK_PTR, 0)->dest->next_bb;
-
- while (bb != EXIT_BLOCK_PTR)
- {
- edge_iterator ei;
- edge e, best = NULL;
- while (end->rbi->next)
- end = end->rbi->next;
-
- FOR_EACH_EDGE (e, ei, end->succs)
- if (e->dest != EXIT_BLOCK_PTR
- && e->dest != EDGE_SUCC (ENTRY_BLOCK_PTR, 0)->dest
- && !e->dest->rbi->visited
- && (!best || EDGE_FREQUENCY (e) > EDGE_FREQUENCY (best)))
- best = e;
-
- if (best)
- {
- end->rbi->next = best->dest;
- best->dest->rbi->visited = 1;
- }
- else
- for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
- {
- if (!bb->rbi->visited)
- {
- end->rbi->next = bb;
- bb->rbi->visited = 1;
- break;
- }
- }
- }
-}
-
-/* Main entry point to this file. FLAGS is the set of flags to pass
- to cfg_layout_initialize(). */