From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29016 invoked by alias); 20 Sep 2018 16:10: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 28992 invoked by uid 89); 20 Sep 2018 16:10:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr1-f65.google.com Received: from mail-wr1-f65.google.com (HELO mail-wr1-f65.google.com) (209.85.221.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Sep 2018 16:10:46 +0000 Received: by mail-wr1-f65.google.com with SMTP id t15so2076467wrx.1; Thu, 20 Sep 2018 09:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d+QuqCcgahVN2vKfLPOuZFbrNGar2w6IM11gEfLfdbk=; b=pr9ajAGpL9NWNaDx69OLDEHW0MsTalkU0mQ44BjbYM93FFcLM16ShAKZovTJANAVyt 3VD/0flJTQ2SMBVuAjMeP1hJpVPi1YhnVTTeTvhBL1GKr8/Aq4i3LxVYr84utPoVjVGR BFrvi9QAip87szH48Ju9p45+6xwItZYao5mlRvAly7p4gOxWG9i/RRabk+5xlHJDfdcF /eli8nwTgMf++Clco9J1ixD14Y7Bt8U7o60sKjt9ksCNNLBEZtfZT7617HEPzm/lMhVS 6qcNX/sR1Q+TOHLfIULzkQVNPYQrAOyG7P7me/waD15Kq44y+5NCzB6e5jli8kMKsmN6 /afQ== Return-Path: Received: from nbbrfq.loc (91-119-125-11.dsl.dynamic.surfer.at. [91.119.125.11]) by smtp.gmail.com with ESMTPSA id g7-v6sm23092537wrw.30.2018.09.20.09.10.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Sep 2018 09:10:43 -0700 (PDT) Date: Thu, 20 Sep 2018 16:20:00 -0000 From: Bernhard Reutner-Fischer To: Cesar Philippidis Cc: "gcc-patches@gcc.gnu.org" , Fortran List , Jakub Jelinek Subject: Re: [openacc] Teach gfortran to lower OpenACC routine dims Message-ID: <20180920181039.75c5b32b@nbbrfq.loc> In-Reply-To: References: <20180920002718.6b610881@nbbrfq.cc.univie.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg01170.txt.bz2 On Thu, 20 Sep 2018 07:41:08 -0700 Cesar Philippidis wrote: > On 09/19/2018 03:27 PM, Bernhard Reutner-Fischer wrote: > > On Wed, 5 Sep 2018 12:52:03 -0700 > > Cesar Philippidis wrote: > >> diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c > >> index eea6b81ebfa..eed868f475b 100644 > >> --- a/gcc/fortran/trans-decl.c > >> +++ b/gcc/fortran/trans-decl.c > >> @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not > >> see #include "trans-stmt.h" > >> #include "gomp-constants.h" > >> #include "gimplify.h" > >> +#include "omp-general.h" > > > > hmz. so the gomp-constants.h include would be redundant, but do we > > really need omp-general.h? > > Good point. omp-general.h is required for oacc_build_routine_dims. > > > Doesn't this suggest to move this oacc dims lowering to > > trans-openmp.c instead, please? > > So something like adding a new gfc_add_omp_offload_attributes to > trans-openmp.c and call it from add_attributes_to_decl? yes. > On a related note, I noticed that I forgot to incorporate this change > in gfortran.h: > > @@ -902,7 +912,7 @@ typedef struct > unsigned oacc_declare_link:1; > > /* This is an OpenACC acclerator function at level N - 1 */ > - unsigned oacc_function:3; > + ENUM_BITFIELD (oacc_function) oacc_function:3; > > It's probably not huge, but I noticed that some other enum bitfields > are declared that way. yea, some compilers had trouble with enum bitfields (where plain int bitfields like here worked fine, IIRC) but i'm not sure if it's considered legacy these days. Fine with me to be safe. > > > btw.. the OACC merge from the gomp4 branch added a copy'n paste > > error in an error message. May i ask you to regtest and install the > > below: > Sure. That looks reasonable. I'll also update and/or add new tests as > necessary. TIA and cheers,