From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80249 invoked by alias); 9 Dec 2016 13:53: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 80228 invoked by uid 89); 9 Dec 2016 13:53:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=dimensions 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 ESMTP; Fri, 09 Dec 2016 13:53:46 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 82CF1ADE3; Fri, 9 Dec 2016 13:53:43 +0000 (UTC) Date: Fri, 09 Dec 2016 13:53:00 -0000 From: Martin Jambor To: Alexander Monakov Cc: GCC Patches , Jakub Jelinek , Cesar Philippidis , Thomas Schwinge Subject: Re: [PATCH] omp-low.c split Message-ID: <20161209135341.47phh2y3sstf3egu@virgil.suse.cz> Mail-Followup-To: Alexander Monakov , GCC Patches , Jakub Jelinek , Cesar Philippidis , Thomas Schwinge References: <20161209130821.baeo4o3bd2yazgzz@virgil.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00846.txt.bz2 Hi, On Fri, Dec 09, 2016 at 04:25:10PM +0300, Alexander Monakov wrote: > Hi Martin, > > Just one quick question -- do you know if config/nvptx/nvptx.c needs changes > with this patch? I see it has an '#include "omp-low.h"', and it seems your > patch is renaming some functions -- is the intention that no interfaces used in > target-specific files are changed during the split? > Unfortunately no, that file also needs to be changed, even if very slightly. Specifically, omp-general.h also needs to be included and calls to get_oacc_fn_attrib need to be changed to call oacc_get_fn_attrib. omp-low.h has to stay included for omp_reduction_init_op and omp_reduction_init which did not change. Sorry about that, it was the only file in the back-ends and I forgot about it. I have added the following to my patch but it would be great if you verified it still compiles and works as expected for you. Thanks, Martin * config/nvptx/nvptx.c: Include omp-generic.c. (nvptx_expand_call): Adjusted the call to get_oacc_fn_attrib to use its new name. (nvptx_reorg): Likewise. (nvptx_record_offload_symbol): Likewise. diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 405a91b..17fe551 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -55,6 +55,7 @@ #include "gimple.h" #include "stor-layout.h" #include "builtins.h" +#include "omp-general.h" #include "omp-low.h" #include "gomp-constants.h" #include "dumpfile.h" @@ -1389,7 +1390,7 @@ nvptx_expand_call (rtx retval, rtx address) if (DECL_STATIC_CHAIN (decl)) cfun->machine->has_chain = true; - tree attr = get_oacc_fn_attrib (decl); + tree attr = oacc_get_fn_attrib (decl); if (attr) { tree dims = TREE_VALUE (attr); @@ -4090,7 +4091,7 @@ nvptx_reorg (void) /* Determine launch dimensions of the function. If it is not an offloaded function (i.e. this is a regular compiler), the function has no neutering. */ - tree attr = get_oacc_fn_attrib (current_function_decl); + tree attr = oacc_get_fn_attrib (current_function_decl); if (attr) { /* If we determined this mask before RTL expansion, we could @@ -4243,7 +4244,7 @@ nvptx_record_offload_symbol (tree decl) case FUNCTION_DECL: { - tree attr = get_oacc_fn_attrib (decl); + tree attr = oacc_get_fn_attrib (decl); /* OpenMP offloading does not set this attribute. */ tree dims = attr ? TREE_VALUE (attr) : NULL_TREE;