summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-27 08:20:39 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-27 08:20:39 +0000
commit63f88450d46e1453137aa58c1808134fe68a8f18 (patch)
tree27999109f6865e3cf09cab56d6dcff63b98e5594 /gcc/omp-low.c
parent8d91a9b7a1b6b01a0a1b8c4321274f9fbed7cff6 (diff)
downloadgcc-63f88450d46e1453137aa58c1808134fe68a8f18.tar.gz
* tree-ssa-loop-im.c (determine_invariantness_stmt): Attempt to
transform only GIMPLE_MODIFY_STMTs. * tree-complex.c (expand_complex_operations_1): Ditto. (expand_complex_div_wide): Do not create gotos in COND_EXPR branches. * tree-ssa-loop-manip.c (build_if_stmt): Removed. (tree_transform_and_unroll_loop): Do not create gotos in COND_EXPR branches. * value-prof.c (tree_divmod_fixed_value, tree_mod_pow2, tree_mod_subtract, tree_ic, tree_stringop_fixed_value): Ditto. * omp-low.c (expand_parallel_call, expand_omp_for_generic, expand_omp_for_static_chunk, expand_omp_for_static_nochunk): Ditto. * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes, slpeel_add_loop_guard): Ditto. * tree-mudflap.c (mf_build_check_statement_for): Ditto. * lambda-code.c (perfect_nestify): Ditto. * tree-iterator.c (tsi_split_statement_list_before): Fix splitting before the first statement. * tree-optimize.c (execute_free_datastructures): Fix comments. (execute_free_cfg_annotations): Do not call disband_implicit_edges. * tree-flow.h (disband_implicit_edges): Declaration removed. * tree-cfg.c (make_cond_expr_edges): Remove gotos from COND_EXPR branches. (cleanup_dead_labels, tree_redirect_edge_and_branch): Handle COND_EXPRs without gotos. (disband_implicit_edges, has_label_p): Removed. (tree_verify_flow_info): Verify that COND_EXPR branches are empty. (tree_lv_add_condition_to_bb): Do not create gotos in COND_EXPR branches. * tree.c (build3_stat): Mark COND_EXPRs used as statements as having side effects. * tree-pretty-print.c (dump_implicit_edges): Dump implicit edges also for COND_EXPRs. * cfgexpand.c (label_rtx_for_bb): New function. (expand_gimple_cond_expr): Do not expect gotos in COND_EXPR branches. Use label_rtx_for_bb to find the labels. (expand_gimple_basic_block): Remove RETURN_EXPR at the end of the last block. Detect fallthru edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124214 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c54
1 files changed, 11 insertions, 43 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index ef29e96c271..234c860418f 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2203,7 +2203,7 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
{
basic_block cond_bb, then_bb, else_bb;
edge e;
- tree t, then_lab, else_lab, tmp;
+ tree t, tmp;
tmp = create_tmp_var (TREE_TYPE (val), NULL);
e = split_block (bb, NULL);
@@ -2213,26 +2213,18 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
then_bb = create_empty_bb (cond_bb);
else_bb = create_empty_bb (then_bb);
- then_lab = create_artificial_label ();
- else_lab = create_artificial_label ();
t = build3 (COND_EXPR, void_type_node,
- cond,
- build_and_jump (&then_lab),
- build_and_jump (&else_lab));
+ cond, NULL_TREE, NULL_TREE);
si = bsi_start (cond_bb);
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
si = bsi_start (then_bb);
- t = build1 (LABEL_EXPR, void_type_node, then_lab);
- bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
t = build_gimple_modify_stmt (tmp, val);
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
si = bsi_start (else_bb);
- t = build1 (LABEL_EXPR, void_type_node, else_lab);
- bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
t = build_gimple_modify_stmt (tmp,
build_int_cst (unsigned_type_node, 1));
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
@@ -2579,7 +2571,6 @@ expand_omp_for_generic (struct omp_region *region,
enum built_in_function start_fn,
enum built_in_function next_fn)
{
- tree l0, l1, l2 = NULL, l3 = NULL;
tree type, istart0, iend0, iend;
tree t, list;
basic_block entry_bb, cont_bb, exit_bb, l0_bb, l1_bb;
@@ -2601,18 +2592,12 @@ expand_omp_for_generic (struct omp_region *region,
l0_bb = create_empty_bb (entry_bb);
l1_bb = single_succ (entry_bb);
- l0 = tree_block_label (l0_bb);
- l1 = tree_block_label (l1_bb);
-
cont_bb = region->cont;
exit_bb = region->exit;
if (cont_bb)
{
l2_bb = create_empty_bb (cont_bb);
l3_bb = single_succ (cont_bb);
-
- l2 = tree_block_label (l2_bb);
- l3 = tree_block_label (l3_bb);
}
si = bsi_last (entry_bb);
@@ -2640,8 +2625,7 @@ expand_omp_for_generic (struct omp_region *region,
t = get_formal_tmp_var (t, &list);
if (cont_bb)
{
- t = build3 (COND_EXPR, void_type_node, t, build_and_jump (&l0),
- build_and_jump (&l3));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
}
bsi_insert_after (&si, list, BSI_SAME_STMT);
@@ -2682,8 +2666,7 @@ expand_omp_for_generic (struct omp_region *region,
t = build2 (fd->cond_code, boolean_type_node, fd->v, iend);
t = get_formal_tmp_var (t, &list);
- t = build3 (COND_EXPR, void_type_node, t, build_and_jump (&l1),
- build_and_jump (&l2));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_last (cont_bb);
@@ -2698,8 +2681,7 @@ expand_omp_for_generic (struct omp_region *region,
build_fold_addr_expr (istart0),
build_fold_addr_expr (iend0));
t = get_formal_tmp_var (t, &list);
- t = build3 (COND_EXPR, void_type_node, t, build_and_jump (&l0),
- build_and_jump (&l3));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_start (l2_bb);
@@ -2768,7 +2750,7 @@ static void
expand_omp_for_static_nochunk (struct omp_region *region,
struct omp_for_data *fd)
{
- tree l0, l1, l2, n, q, s0, e0, e, t, nthreads, threadid;
+ tree n, q, s0, e0, e, t, nthreads, threadid;
tree type, list;
basic_block entry_bb, exit_bb, seq_start_bb, body_bb, cont_bb;
basic_block fin_bb;
@@ -2783,10 +2765,6 @@ expand_omp_for_static_nochunk (struct omp_region *region,
fin_bb = single_succ (cont_bb);
exit_bb = region->exit;
- l0 = tree_block_label (seq_start_bb);
- l1 = tree_block_label (body_bb);
- l2 = tree_block_label (fin_bb);
-
/* Iteration space partitioning goes in ENTRY_BB. */
list = alloc_stmt_list ();
@@ -2837,8 +2815,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
e0 = get_formal_tmp_var (t, &list);
t = build2 (GE_EXPR, boolean_type_node, s0, e0);
- t = build3 (COND_EXPR, void_type_node, t, build_and_jump (&l2),
- build_and_jump (&l0));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_last (entry_bb);
@@ -2872,8 +2849,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
t = build2 (fd->cond_code, boolean_type_node, fd->v, e);
t = get_formal_tmp_var (t, &list);
- t = build3 (COND_EXPR, void_type_node, t, build_and_jump (&l1),
- build_and_jump (&l2));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_last (cont_bb);
@@ -2937,7 +2913,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
static void
expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
{
- tree l0, l1, l2, l3, l4, n, s0, e0, e, t;
+ tree n, s0, e0, e, t;
tree trip, nthreads, threadid;
tree type;
basic_block entry_bb, exit_bb, body_bb, seq_start_bb, iter_part_bb;
@@ -2956,12 +2932,6 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
fin_bb = single_succ (cont_bb);
exit_bb = region->exit;
- l0 = tree_block_label (iter_part_bb);
- l1 = tree_block_label (seq_start_bb);
- l2 = tree_block_label (body_bb);
- l3 = tree_block_label (trip_update_bb);
- l4 = tree_block_label (fin_bb);
-
/* Trip and adjustment setup goes in ENTRY_BB. */
list = alloc_stmt_list ();
@@ -3021,8 +2991,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
e0 = get_formal_tmp_var (t, &list);
t = build2 (LT_EXPR, boolean_type_node, s0, n);
- t = build3 (COND_EXPR, void_type_node, t,
- build_and_jump (&l1), build_and_jump (&l4));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_start (iter_part_bb);
@@ -3055,8 +3024,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
t = build2 (fd->cond_code, boolean_type_node, fd->v, e);
t = get_formal_tmp_var (t, &list);
- t = build3 (COND_EXPR, void_type_node, t,
- build_and_jump (&l2), build_and_jump (&l3));
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, NULL_TREE);
append_to_statement_list (t, &list);
si = bsi_last (cont_bb);