summaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-19 14:02:32 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-19 14:02:32 +0000
commitd244d9de1519a228c963cc2e70b29e842aee2ace (patch)
treeb2ceb968dce32746620d8c2755e65d81bba8a568 /gcc/tree-cfgcleanup.c
parentbc22be57958f14d3d43c41cd89959d97c808fb2e (diff)
downloadgcc-d244d9de1519a228c963cc2e70b29e842aee2ace.tar.gz
PR middle-end/54017
* tree-cfgcleanup.c (cleanup_omp_return): Remove. (cleanup_tree_cfg_bb): Don't call it. * omp-low.c (expand_omp_sections): Fix up the !exit_reachable case handling. * c-c++-common/gomp/pr54017.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189658 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index ca79e79776b..b665c5890be 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -606,48 +606,13 @@ split_bbs_on_noreturn_calls (void)
return changed;
}
-/* If GIMPLE_OMP_RETURN in basic block BB is unreachable, remove it. */
-
-static bool
-cleanup_omp_return (basic_block bb)
-{
- gimple stmt = last_stmt (bb);
- basic_block control_bb;
-
- if (stmt == NULL
- || gimple_code (stmt) != GIMPLE_OMP_RETURN
- || !single_pred_p (bb))
- return false;
-
- control_bb = single_pred (bb);
- stmt = last_stmt (control_bb);
-
- if (stmt == NULL || gimple_code (stmt) != GIMPLE_OMP_SECTIONS_SWITCH)
- return false;
-
- /* The block with the control statement normally has two entry edges -- one
- from entry, one from continue. If continue is removed, return is
- unreachable, so we remove it here as well. */
- if (EDGE_COUNT (control_bb->preds) == 2)
- return false;
-
- gcc_assert (EDGE_COUNT (control_bb->preds) == 1);
- remove_edge_and_dominated_blocks (single_pred_edge (bb));
- return true;
-}
-
/* Tries to cleanup cfg in basic block BB. Returns true if anything
changes. */
static bool
cleanup_tree_cfg_bb (basic_block bb)
{
- bool retval = false;
-
- if (cleanup_omp_return (bb))
- return true;
-
- retval = cleanup_control_flow_bb (bb);
+ bool retval = cleanup_control_flow_bb (bb);
if (tree_forwarder_block_p (bb, false)
&& remove_forwarder_block (bb))