From patchwork Thu Feb 16 21:11:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 65133 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46776385B51D for ; Thu, 16 Feb 2023 21:12:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 0548F3858D33 for ; Thu, 16 Feb 2023 21:11:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0548F3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208,223";a="101198085" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 16 Feb 2023 13:11:53 -0800 IronPort-SDR: 82jYpqs39DMe4gXjof0uAN+V0hB3qk0RqPM+SAKi6BB7LFPvmzyZMz3mtD4ECWUemSbcJx0lIm gjbq4nITPOrOUqNaVRRstp6C72M0Je85tGWgEEW9YG5dHxfja80CQQQnXusz8N4Xjx7+FjfKlr 5sr9uhxKeuOzIe5UHFOXZXwzZbaw+WeX1fkUjo/OSnSqTE1By599acDGlNSuTiYtnZzRVYJIZ8 3c/8w+XX2T810zvRSUilfjPbYCWtUWZQApdWRh4YhYecCOkTpkKTauIORoCNt6pezZoxxBF/GF ltc= From: Thomas Schwinge To: Andrew Stubbs , Subject: [og12] Un-break nvptx libgomp build (was: [OG12][committed] amdgcn: OpenMP low-latency allocator) In-Reply-To: <5eaeddf5-317a-4574-868b-87999bb6af33@codesourcery.com> References: <5eaeddf5-317a-4574-868b-87999bb6af33@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Thu, 16 Feb 2023 22:11:46 +0100 Message-ID: <87zg9dxqlp.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2023-02-16T18:06:41+0000, Andrew Stubbs wrote: > 1. 230216-basic-allocator.patch > > Separate the allocator from NVPTX so the code can be shared. Yay! > nvptx, libgomp: Move the low-latency allocator code > > There shouldn't be a functionality change; this is just so AMD can share > the code. I've quickly observed one "functionality" change: > --- /dev/null > +++ b/libgomp/basic-allocator.c > +#ifndef BASIC_ALLOC_YIELD > +#deine BASIC_ALLOC_YIELD > +#endif In file included from [...]/libgomp/config/nvptx/allocator.c:49: [...]/libgomp/config/nvptx/../../basic-allocator.c:52:2: error: invalid preprocessing directive #deine; did you mean #define? 52 | #deine BASIC_ALLOC_YIELD | ^~~~~ | define Yes, indeed. I've pushed to devel/omp/gcc-12 branch commit 6cc0e7bebf1b3ad6aacf75419e7f06942409f90c "Un-break nvptx libgomp build", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 6cc0e7bebf1b3ad6aacf75419e7f06942409f90c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 16 Feb 2023 21:59:55 +0100 Subject: [PATCH] Un-break nvptx libgomp build In file included from [...]/libgomp/config/nvptx/allocator.c:49: [...]/libgomp/config/nvptx/../../basic-allocator.c:52:2: error: invalid preprocessing directive #deine; did you mean #define? 52 | #deine BASIC_ALLOC_YIELD | ^~~~~ | define Yes, indeed. Fix-up for og12 commit 9583738a62a33a276b2aad980a27e77097f95924 "nvptx, libgomp: Move the low-latency allocator code". libgomp/ * basic-allocator.c (BASIC_ALLOC_YIELD): instead of '#deine', '#define' it. --- libgomp/ChangeLog.omp | 3 +++ libgomp/basic-allocator.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index ecc14b4f537..b667c72b8ca 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2023-02-16 Thomas Schwinge + * basic-allocator.c (BASIC_ALLOC_YIELD): instead of '#deine', + '#define' it. + * testsuite/libgomp.c/usm-1.c: Re-enable non-GCN offloading compilation. * testsuite/libgomp.c/usm-2.c: Likewise. diff --git a/libgomp/basic-allocator.c b/libgomp/basic-allocator.c index 94b99a89e0b..b4b9e4ba13a 100644 --- a/libgomp/basic-allocator.c +++ b/libgomp/basic-allocator.c @@ -49,7 +49,7 @@ #endif #ifndef BASIC_ALLOC_YIELD -#deine BASIC_ALLOC_YIELD +#define BASIC_ALLOC_YIELD #endif #define ALIGN(VAR) (((VAR) + 7) & ~7) /* 8-byte granularity. */ -- 2.25.1