From patchwork Tue Sep 23 18:19:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 392619 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 B7660140082 for ; Wed, 24 Sep 2014 04:20:13 +1000 (EST) 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:mime-version:content-type; q=dns; s= default; b=EEskhhjO35jY+A/qPEmEapAeoD7tn3wqfa4QKQhJ7nBzvvDp9oJQa 2QxQZEfwMhED4HDcrAvfsCqgcBlf3Af1YqwOXg/HhtYcK0pFBwxPQHgZhFSYnjQ7 o6wf74Xn3YV+HPbNOZS2iMeeWptPAKwu4jOKWxmV3ihHgP+IdqmPKw= 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:mime-version:content-type; s= default; bh=ih7LgiDkfnzV4Hc1qW5BglnzRww=; b=fo84LZ4XOp4i5SNpYKwl lhO5Q2DpwIBWbKEMBICep/MLE9gC0w3X33UVdywaDWRiWsI/zABhksOO+qlqhnLF UHAUGEsvYi2Z8Q5HCFGXS7P/44kNsJK0Hv64IQqp74WpKg0oOCwOoJCyATeGBTcX MQghFpRjC8zXMugORf6SVzo= Received: (qmail 20615 invoked by alias); 23 Sep 2014 18:20:06 -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 20605 invoked by uid 89); 23 Sep 2014 18:20:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, SUBJ_OBFU_PUNCT_MANY autolearn=no 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, 23 Sep 2014 18:20:05 +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 1XWUh0-0002wk-Dq from Julian_Brown@mentor.com for gcc-patches@gcc.gnu.org; Tue, 23 Sep 2014 11:20:02 -0700 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, 23 Sep 2014 19:20:00 +0100 Date: Tue, 23 Sep 2014 19:19:55 +0100 From: Julian Brown To: Subject: [PATCH 8/10] OpenACC 2.0 support for libgomp - temporarily work around missing __builtin_acc_on_device Message-ID: <20140923191955.51a6f761@octopus> MIME-Version: 1.0 X-IsSubscribed: yes 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. commit b74fb2fcb435b646499e9558a64b3989b64ad943 Author: Julian Brown Date: Fri Sep 19 11:28:11 2014 -0700 Work around lack of __builtin_acc_on_device for now diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c index af2d2aa..35fe643 100644 --- a/libgomp/oacc-init.c +++ b/libgomp/oacc-init.c @@ -451,8 +451,20 @@ ialias (acc_set_device_num) int acc_on_device (acc_device_t dev) { +#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)