From patchwork Tue Nov 14 10:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Krebbel X-Patchwork-Id: 164823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1775288vqg; Tue, 14 Nov 2023 02:51:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt/J1R1roqyhzgemJ5YgRr2T3lQ1sZ1segjfPNKmVSo8+/pEY1Hg3MCTGtAkenOP+O5ff4 X-Received: by 2002:a05:620a:29cb:b0:76f:1076:3b43 with SMTP id s11-20020a05620a29cb00b0076f10763b43mr2065702qkp.1.1699959116208; Tue, 14 Nov 2023 02:51:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699959116; cv=pass; d=google.com; s=arc-20160816; b=LODmoK/xpQtORlenI8Q1Z4TY2v6z8oEn+7yWAMTZ1Av4oBkMCMNFhPdTA+j3hSFYVJ aAEWDFnS0rZUHE6n6c21ptidRfU8b1Z+VLOem0cXm5YIUXAwpcIuO2vCH6Lk8tNiabYE 2bHibjQ4i1pO3gf8OyyN8/7NR8PwP9xVTcNTREdHVY7t4qWmIMmk0dPOVFecOtbP2M1s rXHyIhpQeOXTxr2nzHuKP1mmIthn17Oh2tyD+e3OAMyvYSJ8dtowkqjY3Rn8zV+9CAT0 A4hqX1uUfDDaXen3I0gD5qNiTd/hg5EeyVrHWbHy0GZn4D2zt/W6IzLWKrUcuEABMN2A 1T9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=1gr/X/zXs0LNbNTnZUKB+ZWCcrVg7uNH9w/G9SjC7tg=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=ExIYWKj35BsqofGpvvFxTswtaSdpFZLt0FkX2fc+WH17UZ0F6oAJf8XGaxIcLcRAT7 D6PNJSNG2ZzHJGdHEYZ+zhOG7oLZcUxVriMxsqyqqMJZ6XG5P+QBbEttFeTVqtJqfbeT aDwoa9b0RWEpLHg1MEoc06y11EhRCDk8YOEyuhIVWdd4XyUPP2+zfV75M/sOzhdY5RFo pYJcxZsxFXwMSa1GvwxRSvCGQ6BHMCgvCdpzMzn8CEe66Gc83gtAErPRFYEjq9seFWLM h68DWmSyGXhp2vIHkqT39po7GfQjFnbrpS8kOY+5eJlROhj3VqrZE62LjNKRcwPTwGu5 +haQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tiFQFFGD; arc=pass (i=1); 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"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b27-20020a05620a271b00b0077436023382si6738045qkp.198.2023.11.14.02.51.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:51:56 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tiFQFFGD; arc=pass (i=1); 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"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 616B03845165 for ; Tue, 14 Nov 2023 10:51:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id DCF07383C7E2 for ; Tue, 14 Nov 2023 10:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCF07383C7E2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DCF07383C7E2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699959092; cv=none; b=uSckzHAu5tqjstHQ63scXNpvgoTVif42jR2g4AQEIShk7NvuZPFUEZC7fjSfZOPQZ9qy70JPPMInPtY9ga7N3JVUrfuKkw+QPETXaEL9NPpyCJK7h+lpYymTzYX8wmDa/OyI7E6wFSzM2hVzDA5fJgrni+XUcyPs1d1okJba3jI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699959092; c=relaxed/simple; bh=is3/busEhjb8H1WGuU2cSwlmTBe3LQfwf5xecmdKBpM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=A0F0UPoatVClGN/XhwHV8DRjJ5RBDYqjmLK1XFNCEMt+7SICdPiTvv1uzI7TOinv6z8o5UomGp9LuPLNAdCXAvgdr4l9MpOy4rJOD5Kn61murR0ES5mFwPFXid6PQrX82kAyNtbicqb3kmV9/eeJRjruR9VCwbjkoYHK96gfibg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AEAk92Z004433 for ; Tue, 14 Nov 2023 10:51:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=1gr/X/zXs0LNbNTnZUKB+ZWCcrVg7uNH9w/G9SjC7tg=; b=tiFQFFGDbPfxjTPnOezjfqGd0frOsDi75BzzBy99Mh8u5Ivk3rad6oCNssH2R+5Ljmrf d/Gt7/H2AbBkUYSwh3A4c/UnLBCUqo/CWahbX5qE37dNo9DFJ3vcPVHDnNRA96nl3zbc WWY4Mrj7+YXjg5zE8BSvrJ3amNJzKYkLnZWuu7qAZLYP1GAAKEZpsXlXK0yBFpbWaQ0r 2MVc6hiCbLHAAi+j6/GiFmxmKoZv6YT3ZzLVG72SMYLPLE4gdBUEYVEoqwMfltLfKSBa ksXxjJOo0m0/K3ncQOXEfTp6kR4yadPl9ley6MB//C82tVrUFClF6G9e01kMF+e9Vcpu cA== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uc7eag7du-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Nov 2023 10:51:30 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AE8QreN011640 for ; Tue, 14 Nov 2023 10:51:29 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uanekf2w6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Nov 2023 10:51:29 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AEApR015833454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 14 Nov 2023 10:51:27 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8C2982004B for ; Tue, 14 Nov 2023 10:51:27 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5DE2D20040 for ; Tue, 14 Nov 2023 10:51:27 +0000 (GMT) Received: from li-ecc9ffcc-3485-11b2-a85c-e633c5126265.fritz.box (unknown [9.171.2.167]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP for ; Tue, 14 Nov 2023 10:51:27 +0000 (GMT) From: Andreas Krebbel To: gcc-patches@gcc.gnu.org Subject: [Committed] IBM Z: Add GTY marker to builtin data structures Date: Tue, 14 Nov 2023 11:51:27 +0100 Message-ID: <20231114105127.303538-1-krebbel@linux.ibm.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OXbNerK8nO9jBu9lcB1ZKtKHeRrLN8wh X-Proofpoint-GUID: OXbNerK8nO9jBu9lcB1ZKtKHeRrLN8wh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-14_10,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 clxscore=1015 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=733 phishscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311140084 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782536330145607956 X-GMAIL-MSGID: 1782536330145607956 This adds GTY markers to s390_builtin_types, s390_builtin_fn_types, and s390_builtin_decls. These were missing causing problems in particular when using builtins after including a precompiled header. Unfortunately the declaration of these data structures use enum values from s390-builtins.h. This file however is not included everywhere and is rather large. In order to include it only for the purpose of gtype-desc.cc we place a preprocessed copy of it in the build directory and include only this. This is going to be backported to GCC 12 and 13. Bootstrapped and regression tested on IBM Z. Committed to mainline. gcc/ChangeLog: * config.gcc: Add s390-gen-builtins.h to target_gtfiles. * config/s390/s390-builtins.h (s390_builtin_types) (s390_builtin_fn_types, s390_builtin_decls): Add GTY marker. * config/s390/t-s390 (EXTRA_GTYPE_DEPS): Add s390-gen-builtins.h. Add build rule for s390-gen-builtins.h. --- gcc/config.gcc | 1 + gcc/config/s390/s390-builtins.h | 10 +++++----- gcc/config/s390/t-s390 | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index ba6d63e33ac..c1460ca354e 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -571,6 +571,7 @@ s390*-*-*) d_target_objs="s390-d.o" extra_options="${extra_options} fused-madd.opt" extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h" + target_gtfiles="./s390-gen-builtins.h" ;; # Note the 'l'; we need to be able to match e.g. "shle" or "shl". sh[123456789lbe]*-*-* | sh-*-*) diff --git a/gcc/config/s390/s390-builtins.h b/gcc/config/s390/s390-builtins.h index 45bba876828..84676fe5b3f 100644 --- a/gcc/config/s390/s390-builtins.h +++ b/gcc/config/s390/s390-builtins.h @@ -88,8 +88,8 @@ enum s390_builtin_ov_type_index #define MAX_OV_OPERANDS 6 -extern tree s390_builtin_types[BT_MAX]; -extern tree s390_builtin_fn_types[BT_FN_MAX]; +extern GTY(()) tree s390_builtin_types[BT_MAX]; +extern GTY(()) tree s390_builtin_fn_types[BT_FN_MAX]; /* Builtins. */ @@ -172,6 +172,6 @@ opflags_for_builtin (int fcode) return opflags_builtin[fcode]; } -extern tree s390_builtin_decls[S390_BUILTIN_MAX + - S390_OVERLOADED_BUILTIN_MAX + - S390_OVERLOADED_BUILTIN_VAR_MAX]; +extern GTY(()) tree s390_builtin_decls[S390_BUILTIN_MAX + + S390_OVERLOADED_BUILTIN_MAX + + S390_OVERLOADED_BUILTIN_VAR_MAX]; diff --git a/gcc/config/s390/t-s390 b/gcc/config/s390/t-s390 index 828818bed2d..4ab9718f6e2 100644 --- a/gcc/config/s390/t-s390 +++ b/gcc/config/s390/t-s390 @@ -19,6 +19,7 @@ TM_H += $(srcdir)/config/s390/s390-builtins.def TM_H += $(srcdir)/config/s390/s390-builtin-types.def PASSES_EXTRA += $(srcdir)/config/s390/s390-passes.def +EXTRA_GTYPE_DEPS += ./s390-gen-builtins.h s390-c.o: $(srcdir)/config/s390/s390-c.cc \ $(srcdir)/config/s390/s390-protos.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -30,3 +31,6 @@ s390-c.o: $(srcdir)/config/s390/s390-c.cc \ s390-d.o: $(srcdir)/config/s390/s390-d.cc $(COMPILE) $< $(POSTCOMPILE) + +s390-gen-builtins.h: $(srcdir)/config/s390/s390-builtins.h + $(COMPILER) -E $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< > $@