From patchwork Fri Jan 15 14:51:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 568123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 26E1C140BF9 for ; Sat, 16 Jan 2016 01:52:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=LaRizxH5; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=rExkxVX/n/m0dvUVtgXS9KLq9Nco5I bRt09ClBMCP3E0Ot/er9d3ltACrB9ajfbDvE0M60RWininqJjFTbBBZv+r+lvZqF PGi9s/ory0iL9mNnTz9OD17vJbmONkscyNyyw5iqO/Jd5pt1jxkp+1PHogzhEQeB oVj5Nguj+XhEg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=nPbxt/kKRk3G+A6cmaafF8Dfb34=; b=LaRi zxH5AVE3S1AHdguLIZ7AkMX9XLjQbKP9KgvNlBIuw0Fqj+zRpW2+okvpNHKqzXv6 qVHVDbSGqrKrbQYno9dn+Aq2IhHBWYHF3PHMd7d3U3euFy3hVMXvER5cQeu5wXll cUc3/XihfeZ7osdbPNcrovG/KLe5kNudORs6PPo= Received: (qmail 17296 invoked by alias); 15 Jan 2016 14:52:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17284 invoked by uid 89); 15 Jan 2016 14:52:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=*target, spc, DEVICE, iedntifier X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 15 Jan 2016 14:52:03 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 398D5AAB4 for ; Fri, 15 Jan 2016 14:51:59 +0000 (UTC) Date: Fri, 15 Jan 2016 15:51:58 +0100 From: Martin Jambor To: gcc-patches@gcc.gnu.org Subject: Re: [hsa merge 05/10] OpenMP lowering/expansion changes (gridification) Message-ID: <20160115145158.GK3982@virgil.suse.cz> Mail-Followup-To: gcc-patches@gcc.gnu.org References: <20160113173925.220029649@virgil.suse.cz> <20160113173925.642670007@virgil.suse.cz> <20160114125152.GC3017@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160114125152.GC3017@tucnak.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Thanks Jakub and Alex, I have committed the following to the branch to address your comments: 2016-01-15 Martin Jambor * gimple.h: Fixed comment of gimple_statement_omp_single_layout * omp-low.c (get_target_argument_value): Fixed spelling in its comment. (push_target_argument_according_to_value): Likewise. * tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): Renamed to OMP_CLAUSE__GRIDDIM__DIMENSION --- gcc/gimple.h | 2 +- gcc/omp-low.c | 12 ++++++------ gcc/tree-pretty-print.c | 2 +- gcc/tree.h | 5 +---- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index 7eef07c..6d15dab 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -730,7 +730,7 @@ struct GTY((tag("GSS_OMP_CONTINUE"))) tree control_use; }; -/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_ORDERED */ +/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TEAMS, GIMPLE_OMP_ORDERED */ struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) gimple_statement_omp_single_layout : public gimple_statement_omp diff --git a/gcc/omp-low.c b/gcc/omp-low.c index c534f5c..616c5bd 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -12741,7 +12741,7 @@ grid_get_kernel_launch_attributes (gimple_stmt_iterator *gsi, if (OMP_CLAUSE_CODE (clause) != OMP_CLAUSE__GRIDDIM_) continue; - unsigned dim = OMP_CLAUSE_GRIDDIM_DIMENSION (clause); + unsigned dim = OMP_CLAUSE__GRIDDIM__DIMENSION (clause); max_dim = MAX (dim, max_dim); grid_insert_store_range_dim (gsi, lattrs, @@ -12788,7 +12788,7 @@ get_target_argument_identifier (int device, bool subseqent_param, int id) return fold_convert (ptr_type_node, t); } -/* Return a target argument consisiting of DEVICE identifier, value identifier +/* Return a target argument consisting of DEVICE identifier, value identifier ID, and the actual VALUE. */ static tree @@ -12806,8 +12806,8 @@ get_target_argument_value (gimple_stmt_iterator *gsi, int device, int id, } /* If VALUE is an integer constant greater than -2^15 and smaller than 2^15, - push one argument to ARGS with bot the DEVICE, ID and VALUE embeded in it, - otherwise push an iedntifier (with DEVICE and ID) and the VALUE in two + push one argument to ARGS with both the DEVICE, ID and VALUE embedded in it, + otherwise push an identifier (with DEVICE and ID) and the VALUE in two arguments. */ static void @@ -17693,7 +17693,7 @@ grid_attempt_target_gridification (gomp_target *target, ws = build_zero_cst (uint32_type_node); tree c = build_omp_clause (UNKNOWN_LOCATION, OMP_CLAUSE__GRIDDIM_); - OMP_CLAUSE_SET_GRIDDIM_DIMENSION (c, (unsigned int) i); + OMP_CLAUSE__GRIDDIM__DIMENSION (c) = i; OMP_CLAUSE__GRIDDIM__SIZE (c) = gs; OMP_CLAUSE__GRIDDIM__GROUP (c) = ws; OMP_CLAUSE_CHAIN (c) = gimple_omp_target_clauses (target); @@ -17749,7 +17749,7 @@ grid_gridify_all_targets (gimple_seq *body_p) memset (&wi, 0, sizeof (wi)); walk_gimple_seq_mod (body_p, grid_gridify_all_targets_stmt, NULL, &wi); } - + /* Main entry point. */ diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 31cea10..9c13d84 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -944,7 +944,7 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags) case OMP_CLAUSE__GRIDDIM_: pp_string (pp, "_griddim_("); - pp_unsigned_wide_integer (pp, OMP_CLAUSE_GRIDDIM_DIMENSION (clause)); + pp_unsigned_wide_integer (pp, OMP_CLAUSE__GRIDDIM__DIMENSION (clause)); pp_colon (pp); dump_generic_node (pp, OMP_CLAUSE__GRIDDIM__SIZE (clause), spc, flags, false); diff --git a/gcc/tree.h b/gcc/tree.h index e885ea1..9b987bb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1636,12 +1636,9 @@ extern void protected_set_expr_location (tree, location_t); #define OMP_CLAUSE_TILE_LIST(NODE) \ OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_TILE), 0) -#define OMP_CLAUSE_GRIDDIM_DIMENSION(NODE) \ +#define OMP_CLAUSE__GRIDDIM__DIMENSION(NODE) \ (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_)\ ->omp_clause.subcode.dimension) -#define OMP_CLAUSE_SET_GRIDDIM_DIMENSION(NODE, DIMENSION) \ - (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_)\ - ->omp_clause.subcode.dimension = (DIMENSION)) #define OMP_CLAUSE__GRIDDIM__SIZE(NODE) \ OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_), 0) #define OMP_CLAUSE__GRIDDIM__GROUP(NODE) \