From patchwork Fri Dec 9 13:53:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 704567 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 3tZtxf3CzDz9sCZ for ; Sat, 10 Dec 2016 00:53:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="gKoibdSF"; 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=wQr8QdVxKqzO/ATAs pAX9spEfLI3zV75B+ztpT0r49tqrn9VWkBiS+PrHF8ai77gO7ncBPvMqr+tmzVXe x2pVqQK+UsldgDiOqGle53/1ZQS9IfozuIOCVXJt1sFyYWc0YnKOdFoD9waHgt8q Q2wN4QPDab54XU0OpatCduglq8= 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=YKOlisDsuG/zT3JOla6Ci+l PRv8=; b=gKoibdSFUhW2b6OxZ9RSd7rDkgtpk531AX+upIULreVwF3QhBf6r2OI KqeWN1LapxT3yboPE35Jx8NyuVWA9MD2WHa1owDS3tPgXbkMem2l/c0FLTvs6Y75 VJVm3nGdTQKursVkiEd6F7UCWKhb/BaDhNRjgJSdY+WLM8oWlhfE= 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-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 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, 9 Dec 2016 14:53:41 +0100 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) X-IsSubscribed: yes 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;