From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 0CA90385C409 for ; Tue, 30 Nov 2021 15:15:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0CA90385C409 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AUElI5M032432; Tue, 30 Nov 2021 15:15:08 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cnp1crq5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 15:15:06 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AUF99FC036032; Tue, 30 Nov 2021 15:14:53 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cnp1crphh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 15:14:53 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AUFE3Ok015094; Tue, 30 Nov 2021 15:14:41 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma03dal.us.ibm.com with ESMTP id 3ckcabe890-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 15:14:41 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AUFEebT61800878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Nov 2021 15:14:40 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E3DB124070; Tue, 30 Nov 2021 15:14:40 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC542124062; Tue, 30 Nov 2021 15:14:39 +0000 (GMT) Received: from [9.160.47.23] (unknown [9.160.47.23]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 30 Nov 2021 15:14:39 +0000 (GMT) Message-ID: <9baa0bc5-700e-1c35-bb6a-2dd50f701f8e@linux.ibm.com> Date: Tue, 30 Nov 2021 09:14:38 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127] Content-Language: en-US To: Richard Biener , Qing Zhao Cc: GCC Patches , =?UTF-8?Q?Martin_Li=c5=a1ka?= References: From: Peter Bergner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: sNnJsFvXUMN4ExojwwJAwRP0z7ABe9LV X-Proofpoint-GUID: F9ydelgcCCEgPTCNwiwPQCjVKnhRcCCt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_09,2021-11-28_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111300081 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, 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-List-Received-Date: Tue, 30 Nov 2021 15:15:10 -0000 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. 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. 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). > Can they be initialized? I see they can be copied at least. __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 initializing __vector_pairs. > 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? We used to have CONST0_RTX defined (but nothing else), but we had problems with the compiler CSEing the initialization for multiple __vector_quads and then copying the values around. We'd end up with one xxsetaccz instruction 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 least be able to support -ftrivial-auto-var-init=zero. The =pattern version would be more problematical...unless the value for pattern was loaded from memory. Peter