From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id EED013858D28 for ; Tue, 30 Nov 2021 17:51:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EED013858D28 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AUHXbHC031629; Tue, 30 Nov 2021 17:51:43 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3cmueek2hs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Nov 2021 17:51:42 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AUHjidf014725; Tue, 30 Nov 2021 17:51:42 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by aserp3020.oracle.com with ESMTP id 3cnhvd5t5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Nov 2021 17:51:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f3wPbzsx6cuBNgmOubwlEaKe4BC3oD7k7py+RTgZexk1DP5gt2b5sbxvLe3dGIFW0or6SgTLuVnj4SMuNyG/fxI0lWoiSGjf+XFL/7T7iFybZ7HftjWSxevlg4CHl+vVNtjIGfE+qaJr9u2LzRQrgPkd12qx6y5J46LZrXAQLqUEDsUIqDxynlUT9Amrw1iTzg/FdsceWB/S2Y78KVzhGLhi8s+ctyZRxL0hOg8/ErWgL5JAIszuvdKKdn2l9osdbq4/+QLRIeax14ubxcEz7UcoBqsGmPEAP4wJuGMZRgDncIRDnnv11eN4kGq4Kl95g3qbHo7AdxAhYzoCXK3aNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=h73athZU6TRHpNMdmwzNTZSvV9zSMx8mvZwuSq+yPIU=; b=hJN1Z0WSDrSCr9BF+wGwqEt8AoEaFa0A01qeJLWvAZDaM4SQZpqZal4O+pbN1/GNoBHiS0YuxWyT+WI292lxJ0f6A38so8/11csz1UUK+18S8Q3tuuK2PcailV2HPBnWQ8usztygnF1nFXyhwC/3MkT/gYuHRgN0BqR/s4Igs2BvHbHKAvAbK1InAK4iqnHwohXW8ZcHxhh9yhlpIpTfhf1O2eHZs9ts6ralvK0fuFfV/fes/oqvDQdCJytwZgA14cbAXq5ePa82rtqklX4u0CtMicfMLw0YO4jYuyccq1UNaxUXRIvBIdbL9GAXEYVkDA+hWvg5ZUV53uT2IlG6Rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) by CH2PR10MB4248.namprd10.prod.outlook.com (2603:10b6:610:7e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Tue, 30 Nov 2021 17:51:39 +0000 Received: from CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::8dd2:f5a2:23e8:1a7c]) by CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::8dd2:f5a2:23e8:1a7c%7]) with mapi id 15.20.4713.027; Tue, 30 Nov 2021 17:51:39 +0000 From: Qing Zhao To: Peter Bergner CC: Richard Biener , GCC Patches , =?Windows-1252?Q?Martin_Li=9Aka?= Subject: Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127] Thread-Topic: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127] Thread-Index: AQHX5WwTjJh7oU+Nbk62XtNij1QDhqwbHcEAgACiVwCAAG8LAIAAK9yA Date: Tue, 30 Nov 2021 17:51:39 +0000 Message-ID: References: <9baa0bc5-700e-1c35-bb6a-2dd50f701f8e@linux.ibm.com> In-Reply-To: <9baa0bc5-700e-1c35-bb6a-2dd50f701f8e@linux.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3608.120.23.2.7) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f82f5b77-b05f-48e4-0c43-08d9b42a0ff4 x-ms-traffictypediagnostic: CH2PR10MB4248: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MI1xFQ5yQT/jjqzzUOnm+UIRFUd8J8PARPnzw6e2/D7FHYuqnwcId9e7fqFiAw5XTC9zqs2ua4mOJgsudTmv8aMak7GTu2AY9j/QXmvlxFQ4yimi7m2XPq8n0YdtG1hFZlHRduyzWpbCaKqF9p+1mG9eg46cHqWW8Cw23q3wW0/+5j4EJmogemmrGs71l5zHMWwLZOQsFR9NnjBWwmOWNgAXYD39typFeTUP9O/VKOkLX11r4j1+JKeQgXESwRI7hgov6uM7lKWxydH+MtOyKqz2BLFBpsEwbYYmRezq7gF7lMSspH91+OMzM5BpLODDL2YRRGpwj0y4U18UnrSV60xCgGj6YqhFHB37c+vzSrS9CWaCoNrT4CPdmv7/6xhMomT3fWv2dzC2tqXrAe0KVBdJDP/Xbf1eGS6+qsx0JdtvNiXCme2zDlFN7wAwlirc2DjnWETAa+SGDQi4mxUfl3NpsobwlwIkt67AoDfbkRadhyocEzeGqNJe1kadi74iyJWoI15vzVVPU3WbJ8wJyRxEVIA4rh+Fl0M0ObvrM0F8K/u7wU+8uZMKKp+xPV7hJ2NoWxXgNLHH9bhv5EzsOdVUt2/M2XqfRwlUcJOxP546mok2P+UC2kryx+ctTjdJKNkmcfWpvIbBAdlfKUEeq/4sBxliBKmjIDju9PNsD+Ea/3AfsjDMSshHaC3HRmCv1MiZwrhnWYaY2sRZbzzpNCMVCNJK2rUeIKh6dBA5v/HDONqQw8X5TqIOX6QK8LvR x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR10MB4344.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2906002)(66476007)(66946007)(86362001)(64756008)(2616005)(26005)(6506007)(4326008)(38070700005)(71200400001)(53546011)(66556008)(6512007)(8676002)(33656002)(186003)(66446008)(83380400001)(5660300002)(6916009)(76116006)(316002)(44832011)(91956017)(38100700002)(36756003)(6486002)(122000001)(54906003)(508600001)(8936002)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?F8LNRbzo47wZl86SKWVGTZ7HdgZmHxZl/oRGdXyCydqcL184dnkh+Qmk?= =?Windows-1252?Q?Y8eCDlTojAKX/rPV4QJmMmjVKPdpY1I0yHm7pIC4RzchAJLxyDnHzCmL?= =?Windows-1252?Q?QUI/8j00IKPtL4Y0CfaBi7HXjkFiZvjb4JqbQ3eej9sBTAtWk+pm+mQC?= =?Windows-1252?Q?3Tc7emk9yehnhkFMpVj0+u7DoJsyWFiDtOyUwApOIBZjEMLesY8NCQ4O?= =?Windows-1252?Q?7/8RfPdVP5hItrwcehuF9mY1y3oMa7Cg/TdrM86EEk00JmO0WDNGH8Gk?= =?Windows-1252?Q?AD1dUVq4Wkh8agbmbI/OfBb7t5TYNWD5kylFrKfYJvtg+L81zSPe/Q+c?= =?Windows-1252?Q?1NSSKJMDOxxHSdH571CgJee7V0/0NtJzXY+jsgTnI9jeJy13WUlalmmw?= =?Windows-1252?Q?a6qmuIg8aQZbVcAXBzs6uvfgOECvLflK6Q4dr+e+3pdceXFFrko4sNbk?= =?Windows-1252?Q?LZbpGgBMcolDFY9lAC4vIPzUaAvhfWDEOeqsruoLCOpeop9wJDo5QnRS?= =?Windows-1252?Q?Maq9pMd6zXYV0LuC3DOfRmthQpJ0sUzOQ04rJ+96kLSYhodwANDhX+/E?= =?Windows-1252?Q?MbCYYls2v7SrWwNuhTnehv7bJNk2SinQDMWcdnbhekf5ZWb2KVZG/6J8?= =?Windows-1252?Q?suV//gSaYc0vZx8OUhlt7N4HLPUCEUpU1d5cKm/4Yc4xhw+D2kx5xuMs?= =?Windows-1252?Q?ABNOEyVd/DF8+Hq4H9u+Di0n7xlSzddfAN+TG16DLQcC4icEob1Ly/zG?= =?Windows-1252?Q?EnXMDp+MRy9DUEsXJZ3OIzzXeHvIYjbe+QCQuMLTpcS7TLD+jSm81yE3?= =?Windows-1252?Q?TqrfiUkhWJ4GImD2IXhSfWX33+TJg01Vu/rEGHDh2RmxopgLNruc8wNj?= =?Windows-1252?Q?G3pEYIM+n0vT7m8a2vj2KjdEP033pG1+ZBk1SO7n/Jgdlf6MTctUmCVI?= =?Windows-1252?Q?4uV8HXXhgCVDw1WOwdLAmY4HIsGQiHA0MpVLk4RWxvIcM9rYwRGdLeQn?= =?Windows-1252?Q?z9wEN+uxp34wU/6+qajVfBDr44x6zKef1g5b5CUys8TPvj1c/WCqKB8T?= =?Windows-1252?Q?RuVNkIZW6TpB4FJ/RejKyNMoyy8eIuujWsaShNxmt/xzpJ7LbbP/xwD0?= =?Windows-1252?Q?R4KAbLZ65lHBhZ3sLrebqkRjrXaN3ycWj1A4SdTXfDLPM8s8iRGOJoyP?= =?Windows-1252?Q?dRBVppFDVsHPa+uOnMIszWEcnWybGyCt8ITYXJI4z2MFdoffzb0aWYbz?= =?Windows-1252?Q?/L0vSMZtGYQQTaGJwwVTF+2zY1qZhuR+8ys4ymI8FKPyCY4ASmWT/TX8?= =?Windows-1252?Q?qwseHvZrJIIuJ4uEFAVwiV1/tm/mtRozzOj7GtsuN1S4XYvP8N8YslhX?= =?Windows-1252?Q?2P3PuEJ/C2oySge2MsCVfHoCefJmG0rmPtTxAkBMha/50rlRx7M1lKrG?= =?Windows-1252?Q?ynVZmm2wVvnVon3QDqGztpCg5OI2YQHeOKyAEN39ITosNDY6Ux4CYHpb?= =?Windows-1252?Q?ccj+CCBrmy6mAiM2KU9TLy6icC1Dz5yVrGiryVJzAI2+xxeTk+2nv04H?= =?Windows-1252?Q?OguwVs9qxBlYR+G+eFWMB3X2TSSk8Iyd6nPskYXqYO4fEVsqZf0D8Yea?= =?Windows-1252?Q?32k1JozqUckQ3Kk2kJSmomER+NeZeTWSwCKcLuNVEAtkGmuVyt/GRc3r?= =?Windows-1252?Q?hiUpf9ZD2Uls/A80OnF+UH+Op/PMO+x3m60W14zTzazC5emZHiiOY/z4?= =?Windows-1252?Q?ElPJZnkBYAEKRQCodxk=3D?= Content-Type: text/plain; charset="Windows-1252" Content-ID: <662E9F90B74ECC43AC0D0643F97BD4CE@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4344.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f82f5b77-b05f-48e4-0c43-08d9b42a0ff4 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2021 17:51:39.7331 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: a9I9pxixX45d+FzsR5kushSFvLpteBeCi8l9+UsP9t7s0iGl7mFBnjZ+QN2RiqrwHLe3aGXdOqEWpBOQeNkXLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4248 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10184 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111300091 X-Proofpoint-ORIG-GUID: 4Vz99mWdm32V3QOdwayq22d1fTKqSZio X-Proofpoint-GUID: 4Vz99mWdm32V3QOdwayq22d1fTKqSZio X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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-List-Received-Date: Tue, 30 Nov 2021 17:51:46 -0000 > On Nov 30, 2021, at 9:14 AM, Peter Bergner wrote: >=20 > On 11/30/21 2:37 AM, Richard Biener wrote: >> On Mon, Nov 29, 2021 at 11:56 PM Qing Zhao wrote: >> I think that's inconsistent indeed. Peter, what are "opaque" >> registers? rs6000-modes.def suggests >> that there's __vector_pair and __vector_quad, what's the GIMPLE types >> for those? It seems they >> are either SSA names or expanded to pseudo registers but there's no >> constants for them. >=20 > The __vector_pair and __vector_quad types are target specific types > for use with our Matrix-Math-Assist (MMA) unit and they are only > usable with our associated MMA built-in functions. What they hold > is really dependent on which MMA built-ins you use on them. > You can think of them a generic (and large) vector type where the > subtype is undefined...or defined by which built-in function you > happen to be using. >=20 > We do not have any constants defined for them. How we initialize them > is either by loading values from memory into them or by zeroing them > out using the xxsetaccz instruction (only for __vector_quads). So, looks like that the variable with OPAQUE_TYPE cannot be all explicitly = initialized even at source code level.=20 The only way to initialize such variable (only __vector_quad, not for __vec= tor_pairs) at source code level is through call to __builtin_mma_xxsetaccz = as: void foo (__vector_quad *dst) { __vector_quad acc; __builtin_mma_xxsetaccz(&acc); *dst =3D acc; } Is this the correct understanding? Is there way to initialize such variable to other values than zero at sourc= e code level? Qing >=20 >=20 >=20 >=20 >> Can they be initialized? I see they can be copied at least. >=20 > __vector_quads can be zero initialized using the __builtin_mma_xxsetaccz(= ) > built-in function. We don't have a method (or use case) for zero initial= izing > __vector_pairs. >=20 >=20 >=20 >> If such "things" cannot be initialized they should indeed be exempt >> from auto-init. The >> documentation suggests that they act as bit-bucked but even bit-buckets = should >> be initializable, thus why exactly does CONST0_RTX not exist for them? >=20 > We used to have CONST0_RTX defined (but nothing else), but we had problem= s > with the compiler CSEing the initialization for multiple __vector_quads a= nd > then copying the values around. We'd end up with one xxsetaccz instructi= on > and copies out of that accumulator register into the other accumulator > registers. Copies are VERY expensive, while xxsetaccz's are cheap, so we > don't want that. That said, I think a fix I put in to disable fwprop on > these types may have been the culprit for that problem, so maybe we could > add the CONST0_RTX back? I'd have to verify that. If so, then we'd at l= east > be able to support -ftrivial-auto-var-init=3Dzero. The =3Dpattern versio= n > would be more problematical...unless the value for pattern was loaded fro= m > memory. >=20 > Peter >=20 >=20