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: 58237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp531822wrn; Thu, 16 Feb 2023 13:12:25 -0800 (PST) X-Google-Smtp-Source: AK7set+R3RnRO/5oBur4v2C88kd7LcN5UFTrgDNeO2/SEoLm9C3z5XfRhT0S0z4wumlTvoaDvHTu X-Received: by 2002:a17:907:c085:b0:8b1:7eb7:d53b with SMTP id st5-20020a170907c08500b008b17eb7d53bmr906923ejc.40.1676581945319; Thu, 16 Feb 2023 13:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676581945; cv=none; d=google.com; s=arc-20160816; b=QU178GzB/EupZHweOhzR9RWsCoFLisVS5ea2vZaII75tOxBiqvHdeQ5KbjPh5LlYRm ZbapyGIxnoEegD1Y4O0gdt/Dht7EUKI20UPznwWmHGjM+5sUy/kruXoHR4YFKFz9i/EK wS7tOV4D+CB93Kd5+bn2eSyZeZVP8xyGUfAJDL8Kv5Jaze1PiK23XRNs+4s9BhQMad3L tdYIDyugusFlHb3ISKrrAfw9g0tFWEHg9pmq4y/O+HiXhEuCId0+P5wbaLPIPOOZ0X5D LTVmp4u0FJs7ekW8EII7Gm0k+uzY88WfrrCp2sLDxpQnviN9dpvx6kq71HW9UAY+YZJW U30A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=rPZvFSN7QxejcDNbAvZdBWy3nt770cYFoEZwfwXWJcI=; b=bxQfABHblBlnEgU6FDpzSEKn/ombTx6/ggZVrhkUabHLpQFH1i8t2Mt4qCVdJqHVJK DwWkDb9zSAlJFg2uSHsXxgEeFzuZ1NN6CIBO3FSnzJUhDMIKpgfEPPccK6Wt2SALFVVH TSDltsUh5qGmi74OPtWIFqSRZNQZyb+8CfZoqt2/4LOt4QjdNMuFxblfgfiV0OTacpcu 5nPxh8mWUFaKfdFVmMhsxUtATAHZ/5TKvxZC70ZnpcWlvCt13R5LeVKhrhw8LQNd9Hlm bNa2fPmgsZeBOC/NgC6hOBPbJdw2ZHMGp6Rq8zf/YwrdjHjj98gcyBtXbkUfxJyz/y4U KaTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f30-20020a170906739e00b0087bd4e90784si2861371ejl.850.2023.02.16.13.12.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 13:12:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 132FF385B526 for ; Thu, 16 Feb 2023 21:12:19 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758023589547937255?= X-GMAIL-MSGID: =?utf-8?q?1758023589547937255?= 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