From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100471 invoked by alias); 26 Oct 2015 13:07:32 -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 100461 invoked by uid 89); 26 Oct 2015 13:07:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 26 Oct 2015 13:07:21 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 630F6A2C00; Mon, 26 Oct 2015 13:07:19 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-121.ams2.redhat.com [10.36.116.121]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9QD7GiO030458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Oct 2015 09:07:18 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id t9QD7FH7031946; Mon, 26 Oct 2015 14:07:15 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id t9QD7Dsg031945; Mon, 26 Oct 2015 14:07:13 +0100 Date: Mon, 26 Oct 2015 13:17:00 -0000 From: Jakub Jelinek To: Ilya Verbin Cc: Thomas Schwinge , gcc-patches@gcc.gnu.org, Kirill Yukhin Subject: Re: [gomp4.1] map clause parsing improvements Message-ID: <20151026130713.GS478@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150429111406.GE1751@tucnak.redhat.com> <874mnzrw1z.fsf@schwinge.name> <20150429120644.GG1751@tucnak.redhat.com> <20150609183608.GA47936@msticlxl57.ims.intel.com> <20150611121420.GY10247@tucnak.redhat.com> <87zizf9n2w.fsf@kepler.schwinge.homeip.net> <20151019103408.GP478@tucnak.redhat.com> <87vba29a3y.fsf@schwinge.name> <20151020100340.GX478@tucnak.redhat.com> <20151026125357.GA35077@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151026125357.GA35077@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02736.txt.bz2 On Mon, Oct 26, 2015 at 03:53:57PM +0300, Ilya Verbin wrote: > @@ -7363,7 +7363,7 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, tree *list_p, > n = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); > if ((ctx->region_type & ORT_TARGET) != 0 > && !(n->value & GOVD_SEEN) > - && ((OMP_CLAUSE_MAP_KIND (c) & GOMP_MAP_FLAG_ALWAYS) == 0 > + && (GOMP_MAP_ALWAYS_P (OMP_CLAUSE_MAP_KIND (c)) == 0 > || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_STRUCT)) The || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_STRUCT part can go then too, it was there only because (OMP_CLAUSE_MAP_KIND (c) & GOMP_MAP_FLAG_ALWAYS) has been non-zero for GOMP_MAP_STRUCT (and the () pair around the condition too). We want to be able to remove all map clauses on the target construct, except if it is always {to,from,tofrom}. We do not want to remove release or delete, but those only exist on target exit data and thus are handled by (ctx->region_type & ORT_TARGET) != 0. > @@ -142,6 +143,10 @@ enum gomp_map_kind > #define GOMP_MAP_ALWAYS_FROM_P(X) \ > (((X) == GOMP_MAP_ALWAYS_FROM) || ((X) == GOMP_MAP_ALWAYS_TOFROM)) > > +#define GOMP_MAP_ALWAYS_P(X) \ > + (((X) == GOMP_MAP_ALWAYS_TO) || ((X) == GOMP_MAP_ALWAYS_FROM) \ > + || ((X) == GOMP_MAP_ALWAYS_TOFROM)) You could simplify this e.g. to (((X) == GOMP_MAP_ALWAYS_TO) || GOMP_MAP_ALWAYS_FROM_P (X)) or (GOMP_MAP_ALWAYS_TO_P (X) || ((X) == GOMP_MAP_ALWAYS_FROM)) Otherwise, LGTM. Jakub