Mercurial > hg > CbC > CbC_gcc
diff gcc/tree-ssa-uncprop.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/tree-ssa-uncprop.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/tree-ssa-uncprop.c Thu Oct 25 07:37:49 2018 +0900 @@ -1,5 +1,5 @@ /* Routines for discovering and unpropagating edge equivalences. - Copyright (C) 2005-2017 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of GCC. @@ -184,7 +184,7 @@ for (i = 0; i < n_labels; i++) { tree label = gimple_switch_label (switch_stmt, i); - basic_block bb = label_to_block (CASE_LABEL (label)); + basic_block bb = label_to_block (cfun, CASE_LABEL (label)); if (CASE_HIGH (label) || !CASE_LOW (label) @@ -408,40 +408,10 @@ } } -/* Ignoring loop backedges, if BB has precisely one incoming edge then - return that edge. Otherwise return NULL. */ -static edge -single_incoming_edge_ignoring_loop_edges (basic_block bb) -{ - edge retval = NULL; - edge e; - edge_iterator ei; - - FOR_EACH_EDGE (e, ei, bb->preds) - { - /* A loop back edge can be identified by the destination of - the edge dominating the source of the edge. */ - if (dominated_by_p (CDI_DOMINATORS, e->src, e->dest)) - continue; - - /* If we have already seen a non-loop edge, then we must have - multiple incoming non-loop edges and thus we return NULL. */ - if (retval) - return NULL; - - /* This is the first non-loop incoming edge we have found. Record - it. */ - retval = e; - } - - return retval; -} - edge uncprop_dom_walker::before_dom_children (basic_block bb) { basic_block parent; - edge e; bool recorded = false; /* If this block is dominated by a single incoming edge and that edge @@ -450,7 +420,7 @@ parent = get_immediate_dominator (CDI_DOMINATORS, bb); if (parent) { - e = single_incoming_edge_ignoring_loop_edges (bb); + edge e = single_pred_edge_ignoring_loop_edges (bb, false); if (e && e->src == parent && e->aux) {