diff options
Diffstat (limited to 'gcc/dominance.c')
-rw-r--r-- | gcc/dominance.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/dominance.c b/gcc/dominance.c index 65301094854..3d88c0d3ed1 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -240,14 +240,14 @@ calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb, bool reverse) if (reverse) { ei = ei_start (bb->preds); - en_block = EXIT_BLOCK_PTR; - ex_block = ENTRY_BLOCK_PTR; + en_block = EXIT_BLOCK_PTR_FOR_FN (cfun); + ex_block = ENTRY_BLOCK_PTR_FOR_FN (cfun); } else { ei = ei_start (bb->succs); - en_block = ENTRY_BLOCK_PTR; - ex_block = EXIT_BLOCK_PTR; + en_block = ENTRY_BLOCK_PTR_FOR_FN (cfun); + ex_block = EXIT_BLOCK_PTR_FOR_FN (cfun); } /* When the stack is empty we break out of this loop. */ @@ -333,7 +333,8 @@ static void calc_dfs_tree (struct dom_info *di, bool reverse) { /* The first block is the ENTRY_BLOCK (or EXIT_BLOCK if REVERSE). */ - basic_block begin = reverse ? EXIT_BLOCK_PTR : ENTRY_BLOCK_PTR; + basic_block begin = (reverse + ? EXIT_BLOCK_PTR_FOR_FN (cfun) : ENTRY_BLOCK_PTR_FOR_FN (cfun)); di->dfs_order[last_basic_block] = di->dfsnum; di->dfs_to_bb[di->dfsnum] = begin; di->dfsnum++; @@ -501,9 +502,9 @@ calc_idoms (struct dom_info *di, bool reverse) edge_iterator ei, einext; if (reverse) - en_block = EXIT_BLOCK_PTR; + en_block = EXIT_BLOCK_PTR_FOR_FN (cfun); else - en_block = ENTRY_BLOCK_PTR; + en_block = ENTRY_BLOCK_PTR_FOR_FN (cfun); /* Go backwards in DFS order, to first look at the leafs. */ v = di->nodes; @@ -1097,7 +1098,7 @@ prune_bbs_to_update_dominators (vec<basic_block> bbs, for (i = 0; bbs.iterate (i, &bb);) { - if (bb == ENTRY_BLOCK_PTR) + if (bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)) goto succeed; if (single_pred_p (bb)) @@ -1171,7 +1172,7 @@ determine_dominators_for_sons (struct graph *g, vec<basic_block> bbs, if (son[y] == -1) return; if (y == (int) bbs.length ()) - ybb = ENTRY_BLOCK_PTR; + ybb = ENTRY_BLOCK_PTR_FOR_FN (cfun); else ybb = bbs[y]; @@ -1344,7 +1345,7 @@ iterate_fix_dominators (enum cdi_direction dir, vec<basic_block> bbs, set_immediate_dominator (CDI_DOMINATORS, bb, NULL); *map->insert (bb) = i; } - *map->insert (ENTRY_BLOCK_PTR) = n; + *map->insert (ENTRY_BLOCK_PTR_FOR_FN (cfun)) = n; g = new_graph (n + 1); for (y = 0; y < g->n_vertices; y++) |