From patchwork Tue Nov 11 13:53:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 409455 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 6969C1400F1 for ; Wed, 12 Nov 2014 00:54:08 +1100 (AEDT) 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:in-reply-to:references:mime-version :content-type; q=dns; s=default; b=V2+WsrNA42wvC26TapKUq+cbONsFv 3jMCGGPFU9mbbEnjatGR4kz399HqcaldfqTSDJsHxEIuQozA/XyB9D47nz1DVSMI MlPluT8B5bUu5lsv1AYoiLbzqQe7tamilkB8WOOCD/19homz8eaTovmRAS4yzEbZ Cxzh42Ud2fxlqU= 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:in-reply-to:references:mime-version :content-type; s=default; bh=F5hppg+qE4XR5RRIQhYp9r385Sg=; b=vam tku8AviO0LFUoziG6+SQQw7DXF7CVG6nZuIaYo/7PILPEPPTgXqs5zqCdw/+iVdy knNSed3Uo2OuMFywZmJ4ZeW+nxIxuSBnZh7/6mr9WKYmDX1Z1H7VaIfZ2oUttqNT M18A4j7uk85hW52/K9PJ+XoCZ/erGTCLyiHPMf50= Received: (qmail 22616 invoked by alias); 11 Nov 2014 13:54:01 -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 22603 invoked by uid 89); 11 Nov 2014 13:54:01 -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, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Nov 2014 13:54:00 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XoBtN-0006P8-13 from Julian_Brown@mentor.com ; Tue, 11 Nov 2014 05:53:57 -0800 Received: from octopus (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Tue, 11 Nov 2014 13:53:55 +0000 Date: Tue, 11 Nov 2014 13:53:49 +0000 From: Julian Brown To: , Jakub Jelinek , "Thomas Schwinge" , Ilya Verbin Subject: [PATCH 2/5] OpenACC 2.0 support for libgomp - temporarily work around missing __builtin_acc_on_device (repost) Message-ID: <20141111135349.74df4488@octopus> In-Reply-To: <20140923191955.51a6f761@octopus> References: <20140923191955.51a6f761@octopus> MIME-Version: 1.0 X-IsSubscribed: yes On Tue, 23 Sep 2014 19:19:55 +0100 Julian Brown wrote: > The patches implementing __builtin_acc_on_device are still in > processing. For the time being this patch removes the dependency on > that builtin in the OpenACC runtime. > > Julian > > xxxx-xx-xx Julian Brown > > libgomp/ > * oacc-init.c (acc_on_device): Temporarily hard-code for host > instead of using __builtin_acc_on_device. This patch remains unchanged from the last posting. OK to apply? Julian From 99e76023ff0759925403b43e19612fb859c3759e Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Fri, 19 Sep 2014 11:28:11 -0700 Subject: [PATCH 2/5] Work around lack of __builtin_acc_on_device for now xxxx-xx-xx Julian Brown libgomp/ * oacc-init.c (acc_on_device): Temporarily hard-code for host instead of using __builtin_acc_on_device. --- libgomp/oacc-init.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c index 8c91ea7..1cbb4d7 100644 --- a/libgomp/oacc-init.c +++ b/libgomp/oacc-init.c @@ -545,8 +545,20 @@ acc_on_device (acc_device_t dev) && acc_device_type (thr->dev->type) == acc_device_host_nonshm) return dev == acc_device_host_nonshm || dev == acc_device_not_host; +#if 1 + /* Support for __builtin_acc_on_device comes in later patches. */ + switch (dev) + { + case acc_device_none: + case acc_device_host: + return 1; + default: + return 0; + } +#else /* Just rely on the compiler builtin. */ return __builtin_acc_on_device (dev); +#endif } ialias (acc_on_device) -- 1.7.10.4