hack something up here, it is really not worth the aggravation. */
static bool
-workshare_safe_to_combine_p (basic_block par_entry_bb, basic_block ws_entry_bb)
+workshare_safe_to_combine_p (basic_block ws_entry_bb)
{
struct omp_for_data fd;
- gimple par_stmt, ws_stmt;
-
- par_stmt = last_stmt (par_entry_bb);
- ws_stmt = last_stmt (ws_entry_bb);
+ gimple ws_stmt = last_stmt (ws_entry_bb);
if (gimple_code (ws_stmt) == GIMPLE_OMP_SECTIONS)
return true;
if (single_succ (par_entry_bb) == ws_entry_bb
&& single_succ (ws_exit_bb) == par_exit_bb
- && workshare_safe_to_combine_p (par_entry_bb, ws_entry_bb)
+ && workshare_safe_to_combine_p (ws_entry_bb)
&& (gimple_omp_parallel_combined_p (last_stmt (par_entry_bb))
|| (last_and_only_stmt (ws_entry_bb)
&& last_and_only_stmt (par_exit_bb))))
static void
expand_omp_sections (struct omp_region *region)
{
- tree t, u, vin = NULL, vmain, vnext, l1, l2;
+ tree t, u, vin = NULL, vmain, vnext, l2;
VEC (tree,heap) *label_vec;
unsigned len;
basic_block entry_bb, l0_bb, l1_bb, l2_bb, default_bb;
l2_bb = region->exit;
if (exit_reachable)
{
- if (single_pred (l2_bb) == l0_bb)
+ if (single_pred_p (l2_bb) && single_pred (l2_bb) == l0_bb)
l2 = gimple_block_label (l2_bb);
else
{
}
}
default_bb = create_empty_bb (l1_bb->prev_bb);
- l1 = gimple_block_label (l1_bb);
}
else
{
default_bb = create_empty_bb (l0_bb);
- l1 = NULL_TREE;
l2 = gimple_block_label (default_bb);
}
tree *rhs_p, block;
struct omp_for_data fd;
gimple stmt = gsi_stmt (*gsi_p), new_stmt;
- gimple_seq omp_for_body, body, dlist, ilist;
+ gimple_seq omp_for_body, body, dlist;
size_t i;
struct gimplify_ctx gctx;
}
/* The pre-body and input clauses go before the lowered GIMPLE_OMP_FOR. */
- ilist = NULL;
dlist = NULL;
body = NULL;
lower_rec_input_clauses (gimple_omp_for_clauses (stmt), &body, &dlist, ctx);
wi->info = context;
break;
+ case GIMPLE_COND:
+ {
+ tree lab = gimple_cond_true_label (stmt);
+ if (lab)
+ {
+ n = splay_tree_lookup (all_labels,
+ (splay_tree_key) lab);
+ diagnose_sb_0 (gsi_p, context,
+ n ? (gimple) n->value : NULL);
+ }
+ lab = gimple_cond_false_label (stmt);
+ if (lab)
+ {
+ n = splay_tree_lookup (all_labels,
+ (splay_tree_key) lab);
+ diagnose_sb_0 (gsi_p, context,
+ n ? (gimple) n->value : NULL);
+ }
+ }
+ break;
+
case GIMPLE_GOTO:
{
tree lab = gimple_goto_dest (stmt);