On Tue, Dec 13, 2016 at 11:15:43AM +0100, Martin Jambor wrote:
> I have bootstrapped the two patches on aarch64-linux and bootstrapped
> and tested them on x86_64-linux. What do you think?
Thanks a lot for the work. If you wouldn't mind doing a couple of further
changes (see below), I'd appreciate it, but if you want to commit it right
away, I'm ok with that too.
@@ -4321,7 +4322,7 @@ expand_cilk_for (struct omp_region *region, struct
omp_for_data *fd)
tree child_fndecl
= gimple_omp_parallel_child_fn (
- as_a <gomp_parallel *> (last_stmt (region->outer->entry)));
+ as_a <gomp_parallel *> (last_stmt (region->outer->entry)));
tree t, low_val = NULL_TREE, high_val = NULL_TREE;
for (t = DECL_ARGUMENTS (child_fndecl); t; t = TREE_CHAIN (t))
{
My preference for the above would be
gomp_parallel *par_stmt
= as_a <gomp_parallel *> (last_stmt (region->outer->entry));
tree child_fndecl = gimple_omp_parallel_child_fn (par_stmt);
@@ -6428,7 +6429,7 @@ expand_omp_atomic_pipeline (basic_block load_bb,
basic_block store_bb,
floating point. This allows the atomic operation to properly
succeed even with NaNs and -0.0. */
stmt = gimple_build_cond_empty
- (build2 (NE_EXPR, boolean_type_node,
+ (build2 (NE_EXPR, boolean_type_node,
new_storedi, old_vali));
gsi_insert_before (&si, stmt, GSI_SAME_STMT);
And here
tree ne = build2 (NE_EXPR, boolean_type_node, new_storedi, old_vali);
stmt = gimple_build_cond_empty (ne);
@@ -442,7 +442,7 @@ omp_max_simt_vf (void)
if (!optimize)
return 0;
if (ENABLE_OFFLOADING)
- for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c; )
+ for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;)
I admit I don't know what the coding style we have in this case. Ok either way.
@@ -5860,7 +5860,7 @@ lower_omp_sections (gimple_stmt_iterator *gsi_p,
omp_context *ctx)
new_body = maybe_catch_exception (new_body);
t = gimple_build_omp_return
- (!!omp_find_clause (gimple_omp_sections_clauses (stmt),
+ (!!omp_find_clause (gimple_omp_sections_clauses (stmt),
OMP_CLAUSE_NOWAIT));
gimple_seq_add_stmt (&new_body, t);
maybe_add_implicit_barrier_cancel (ctx, &new_body);
@@ -6023,7 +6023,7 @@ lower_omp_single (gimple_stmt_iterator *gsi_p,
omp_context *ctx)
bind_body = maybe_catch_exception (bind_body);
t = gimple_build_omp_return
- (!!omp_find_clause (gimple_omp_single_clauses (single_stmt),
+ (!!omp_find_clause (gimple_omp_single_clauses (single_stmt),
OMP_CLAUSE_NOWAIT));
gimple_seq_add_stmt (&bind_body_tail, t);
maybe_add_implicit_barrier_cancel (ctx, &bind_body_tail);
And in the above 2 spots something like:
bool nowait = omp_find_clause (gimple_omp_single_clauses (single_stmt),
OMP_CLAUSE_NOWAIT) != NULL_TREE;
t = gimple_build_omp_return (nowait);
(wonder why we use t for gimple, renaming t var to g would be also nice). But
ok either way.
@@ -8668,7 +8669,7 @@ lower_omp_1 (gimple_stmt_iterator *gsi_p, omp_context
*ctx)
break;
case GIMPLE_TRANSACTION:
lower_omp (gimple_transaction_body_ptr (
- as_a <gtransaction *> (stmt)),
+ as_a <gtransaction *> (stmt)),
ctx);
Here it fits, so no need to wrap:
lower_omp (gimple_transaction_body_ptr (as_a <gtransaction *> (stmt)),
ctx);
Jakub