From patchwork Fri Sep 3 05:24:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1524041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=vQ6gkshF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H15qK4tGFz9sSn for ; Fri, 3 Sep 2021 15:25:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA16F3864821 for ; Fri, 3 Sep 2021 05:25:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA16F3864821 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1630646744; bh=HhmhDGm5LoFz8fTnz0SFDc9ZIrQXgddwfBF5UJBTsJQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=vQ6gkshFNQtwZFT3KZdKQOAzCCS6Ls6YW6rawdEWxqU6zcbYVqGJo72OYO0jNcFbV cLvpmrdLHdT/8ndo01CzUQVryhj8xJNznkBr9W6I9ZAP1ucqAXn8OXtohFbwOE8Vkn fow64UBLlKyESs98S3xCCSp3UFi/hNPJm4eYomkQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id 01C753850439 for ; Fri, 3 Sep 2021 05:25:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 01C753850439 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 182IwlMT011478 for ; Thu, 2 Sep 2021 22:25:01 -0700 Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3attqmmerh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 02 Sep 2021 22:25:01 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 2 Sep 2021 22:24:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 2 Sep 2021 22:24:57 -0700 Received: from linux.wrightpinski.org.com (unknown [10.69.242.197]) by maili.marvell.com (Postfix) with ESMTP id 66B755B6953; Thu, 2 Sep 2021 22:24:55 -0700 (PDT) To: Subject: [PATCH] Fix some GC issues in the aarch64 back-end. Date: Thu, 2 Sep 2021 22:24:51 -0700 Message-ID: <1630646691-22135-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Proofpoint-GUID: HzG_ZoquS1RdcPc1IASmjDIaWuVgquEP X-Proofpoint-ORIG-GUID: HzG_ZoquS1RdcPc1IASmjDIaWuVgquEP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-03_01,2021-09-03_01,2020-04-07_01 X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-Patchwork-Original-From: apinski--- via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: apinski@marvell.com Cc: Andrew Pinski Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Andrew Pinski I got some ICEs in my latest testsing while running the libstdc++ testsuite. I had noticed the problem was connected to types and had just touched the builtins code but nothing which could have caused this and I looked for some types/variables that were not being marked with GTY. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. gcc/ChangeLog: * config/aarch64/aarch64-builtins.c (struct aarch64_simd_type_info): Mark with GTY. (aarch64_simd_types): Likewise. (aarch64_simd_intOI_type_node): Likewise. (aarch64_simd_intCI_type_node): Likewise. (aarch64_simd_intXI_type_node): Likewise. * config/aarch64/aarch64.h (aarch64_fp16_type_node): Likewise. (aarch64_fp16_ptr_type_node): Likewise. (aarch64_bf16_type_node): Likewise. (aarch64_bf16_ptr_type_node): Likewise. --- gcc/config/aarch64/aarch64-builtins.c | 10 +++++----- gcc/config/aarch64/aarch64.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index d441437..9f37a71 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -594,7 +594,7 @@ enum aarch64_simd_type }; #undef ENTRY -struct aarch64_simd_type_info +struct GTY(()) aarch64_simd_type_info { enum aarch64_simd_type type; @@ -626,14 +626,14 @@ struct aarch64_simd_type_info #define ENTRY(E, M, Q, G) \ {E, "__" #E, #G "__" #E, NULL_TREE, NULL_TREE, E_##M##mode, qualifier_##Q}, -static struct aarch64_simd_type_info aarch64_simd_types [] = { +static GTY(()) struct aarch64_simd_type_info aarch64_simd_types [] = { #include "aarch64-simd-builtin-types.def" }; #undef ENTRY -static tree aarch64_simd_intOI_type_node = NULL_TREE; -static tree aarch64_simd_intCI_type_node = NULL_TREE; -static tree aarch64_simd_intXI_type_node = NULL_TREE; +static GTY(()) tree aarch64_simd_intOI_type_node = NULL_TREE; +static GTY(()) tree aarch64_simd_intCI_type_node = NULL_TREE; +static GTY(()) tree aarch64_simd_intXI_type_node = NULL_TREE; /* The user-visible __fp16 type, and a pointer to that type. Used across the back-end. */ diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index bfffbcd..a5ba6c2 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -1262,13 +1262,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); /* This type is the user-visible __fp16, and a pointer to that type. We need it in many places in the backend. Defined in aarch64-builtins.c. */ -extern tree aarch64_fp16_type_node; -extern tree aarch64_fp16_ptr_type_node; +extern GTY(()) tree aarch64_fp16_type_node; +extern GTY(()) tree aarch64_fp16_ptr_type_node; /* This type is the user-visible __bf16, and a pointer to that type. Defined in aarch64-builtins.c. */ -extern tree aarch64_bf16_type_node; -extern tree aarch64_bf16_ptr_type_node; +extern GTY(()) tree aarch64_bf16_type_node; +extern GTY(()) tree aarch64_bf16_ptr_type_node; /* The generic unwind code in libgcc does not initialize the frame pointer. So in order to unwind a function using a frame pointer, the very first