From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112664 invoked by alias); 13 Dec 2016 10:35:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 112638 invoked by uid 89); 13 Dec 2016 10:35:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Dec 2016 10:35:45 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 572F5C054905; Tue, 13 Dec 2016 10:35:43 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-100.brq.redhat.com [10.40.204.100]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBDAZfmp010320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Dec 2016 05:35:42 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id uBDAZdq6017123; Tue, 13 Dec 2016 11:35:39 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id uBDAZb6e017122; Tue, 13 Dec 2016 11:35:37 +0100 Date: Tue, 13 Dec 2016 10:35:00 -0000 From: Jakub Jelinek To: Alexander Monakov , GCC Patches , Cesar Philippidis , Thomas Schwinge Subject: Re: [PATCH] omp-low.c split Message-ID: <20161213103537.GN3541@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20161209130821.baeo4o3bd2yazgzz@virgil.suse.cz> <20161209135341.47phh2y3sstf3egu@virgil.suse.cz> <20161209142204.GD3541@tucnak.redhat.com> <20161213101543.n7fx4bph2w4qdg3w@virgil.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161213101543.n7fx4bph2w4qdg3w@virgil.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg01133.txt.bz2 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 (last_stmt (region->outer->entry))); + as_a (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 (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 (stmt)), + as_a (stmt)), ctx); Here it fits, so no need to wrap: lower_omp (gimple_transaction_body_ptr (as_a (stmt)), ctx); Jakub