From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id D9A913858D28 for ; Fri, 17 Nov 2023 01:22:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9A913858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D9A913858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700184132; cv=none; b=c53mpcIQdDjR3HOc60nqb0xTARWTp1Etke/+IqnagBapYOlaS5/EVKiA4Y5FhPJTun8r78MoItM3aTYWKr7lcFlujh3nnTHccTD98RqCErqkUvQYkbJZY3duVd/BRtfhDwEH0aIaZyTfr5HnnqIjuuk710YpUl5WkxO7lbnIR3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700184132; c=relaxed/simple; bh=NpL32Rq23tycDSG4CLzozzArLXoCnJo6jWI7LlcyZWM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LR1x60pdJwoI1zwIj7KZtZc7CJg1Rat0hMLzGmHywWOZRqUaDcaXwMDfz+0SnQ/Y1E8NGFM9KDpndIYkSBb/wvZJIlISOlv/G0e0UTnz7EkkwXud4MSj8QJu9+J052eepac2zQH9COvl/FgJps1hpyxKHZ9zcEpIDeIE9n4NPjA= ARC-Authentication-Results: i=1; server2.sourceware.org References: <3641c999-fe8e-4f75-a9f1-455d65cf39e6@gmail.com> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Sam James To: John David Anglin Cc: Jeff Law , John David Anglin , GCC Patches , Sam James Subject: Re: [committed] hppa: Revise REG+D address support to allow long displacements before reload Date: Fri, 17 Nov 2023 01:20:30 +0000 Organization: Gentoo In-reply-to: Message-ID: <871qcpmawz.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,BODY_8BITS,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: John David Anglin writes: > On 2023-11-16 4:52 p.m., Jeff Law wrote: >> >> >> On 11/16/23 10:54, John David Anglin wrote: >>> Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11.=C2=A0 Committ= ed >>> to trunk. >>> >>> This patch works around problem compiling python3.11 by improving >>> REG+D address handling.=C2=A0 The change results in smaller code and >>> reduced register pressure. >>> >>> Dave >>> --- >>> >>> hppa: Revise REG+D address support to allow long displacements before r= eload >>> >>> In analyzing PR rtl-optimization/112415, I realized that restricting >>> REG+D offsets to 5-bits before reload results in very poor code and >>> complexities in optimizing these instructions after reload.=C2=A0 The >>> general problem is long displacements are not allowed for floating >>> point accesses when generating PA 1.1 code.=C2=A0 Even with PA 2.0, the= re >>> is a ELF linker bug that prevents using long displacements for >>> floating point loads and stores. >>> >>> In the past, enabling long displacements before reload caused issues >>> in reload.=C2=A0 However, there have been fixes in the handling of relo= ads >>> for floating-point accesses.=C2=A0 This change allows long displacements >>> before reload and corrects a couple of issues in the constraint >>> handling for integer and floating-point accesses. >>> >>> 2023-11-16=C2=A0 John David Anglin=C2=A0 >>> >>> gcc/ChangeLog: >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0PR rtl-optimization/112415 >>> =C2=A0=C2=A0=C2=A0=C2=A0* config/pa/pa.cc (pa_legitimate_address_p): Al= low 14-bit >>> =C2=A0=C2=A0=C2=A0=C2=A0displacements before reload.=C2=A0 Simplify log= ic flow.=C2=A0 Revise >>> =C2=A0=C2=A0=C2=A0=C2=A0comments. >>> =C2=A0=C2=A0=C2=A0=C2=A0* config/pa/pa.h (TARGET_ELF64): New define. >>> =C2=A0=C2=A0=C2=A0=C2=A0(INT14_OK_STRICT): Update define and comment. >>> =C2=A0=C2=A0=C2=A0=C2=A0* config/pa/pa64-linux.h (TARGET_ELF64): Define. >>> =C2=A0=C2=A0=C2=A0=C2=A0* config/pa/predicates.md (base14_operand): Don= 't check >>> =C2=A0=C2=A0=C2=A0=C2=A0alignment of short displacements. >>> =C2=A0=C2=A0=C2=A0=C2=A0(integer_store_memory_operand): Don't return tr= ue when >>> =C2=A0=C2=A0=C2=A0=C2=A0reload_in_progress is true.=C2=A0 Remove INT_5_= BITS check. >>> =C2=A0=C2=A0=C2=A0=C2=A0(floating_point_store_memory_operand): Don't re= turn true when >>> =C2=A0=C2=A0=C2=A0=C2=A0reload_in_progress is true.=C2=A0 Use INT14_OK_= STRICT to check >>> =C2=A0=C2=A0=C2=A0=C2=A0whether long displacements are always okay. >> I strongly suspect this is going to cause problems in the end. >> >> I've already done what you're trying to do.=C2=A0 It'll likely look fine >> for an extended period of time, but it will almost certainly break >> one day. Jeff, I don't suppose you could dig out the old bugs/commits just out of interest? > I could happen.=C2=A0 If it happens and can't be fixed, it's easy enough = to return false in > pa_legitimate_address_p before reload.=C2=A0 Maybe we could add an optimi= zation option for this. > > As it stands, the code improvement for python is significant.=C2=A0 I don= 't think f-m-o can fix things after reload. >a > Hopefully, Sam will test the change with various package builds on gentoo= .=C2=A0 Debian is still on gcc-13. Yeah, happy to do that. We haven't got GCC 14 deployed in the wild, but we have it available for people who want to test and opt-in to it. Fingers crossed it's calm. I'll let you know if it isn't ;) > I'm not seeing any obvious problems in the gcc testsuite.=C2=A0 It needs = testing on packages that do extensive > floating point calculations. OK, I'll focus on those. > > Dave