Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 15:21, Koning, Paul wrote: On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches wrote: On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substit

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 15:21, Koning, Paul wrote: On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches wrote: On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substit

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 11:36, Koning, Paul wrote: >> >>> On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: >>> >>> On 10/14/22 10:37, Koning, Paul wrote: > ... > But that approach falls down with reload/lra doing substitutions

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substitutions without validating the result. I guess it might be possible to cobble together something with s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 4:12 PM, Segher Boessenkool > wrote: > > On Fri, Oct 14, 2022 at 07:58:39PM +, Koning, Paul wrote: >>> On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches >>> wrote: >>> On 10/14/22 11:35, Segher Boessenkool wrote: On Fri, Oct 14, 2022 at 11:07:43AM -0600, J

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 07:58:39PM +, Koning, Paul wrote: > > On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches > > wrote: > > On 10/14/22 11:35, Segher Boessenkool wrote: > >> On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: > LRA only ever generates insns that pass recog.

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 11:35, Segher Boessenkool wrote: >> On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: LRA only ever generates insns that pass recog. The backend allows this define_insn, requiring it to be s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 11:35, Segher Boessenkool wrote: On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: LRA only ever generates insns that pass recog. The backend allows this define_insn, requiring it to be split (it returns template "#"), but then somehow it doesn't match in any split pass?

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: > > On 10/14/22 10:37, Koning, Paul wrote: >> >>> ... >>> But that approach falls down with reload/lra doing substitutions without >>> validating the result. I guess it might be possible to cobble together >>> something with secondary reloads,

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: > >LRA only ever generates insns that pass recog. The backend allows this > >define_insn, requiring it to be split (it returns template "#"), but > >then somehow it doesn't match in any split pass? > > Nope.  The elimination code will just

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:39, Richard Biener wrote: Am 14.10.2022 um 16:40 schrieb Jeff Law via Gcc-patches :  On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:37, Koning, Paul wrote: On Oct 14, 2022, at 10:38 AM, Jeff Law via Gcc-patches wrote: On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:37, Segher Boessenkool wrote: Hi! On Thu, Oct 13, 2022 at 10:47:20PM -0600, Jeff Law wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 12:18 PM, Segher Boessenkool > wrote: > > On Fri, Oct 14, 2022 at 12:36:47AM +, Koning, Paul wrote: >> I guess I'll have to look harder to see if it's possible to make LRA handle >> CISC addressing modes like memory indirect, autoincrement, autodecrement, >> and ot

Re: [PATCH] Always enable LRA

2022-10-14 Thread Richard Biener via Gcc-patches
> Am 14.10.2022 um 16:40 schrieb Jeff Law via Gcc-patches > : > >  >> On 10/14/22 06:37, Koning, Paul wrote: >> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: >>> >>> >>> On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/se

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
Hi! On Thu, Oct 13, 2022 at 10:47:20PM -0600, Jeff Law wrote: > On 10/13/22 17:56, Segher Boessenkool wrote: > >h8300 fails during GCC build: > >/home/segher/src/gcc/libgcc/unwind.inc: In function > >'_Unwind_SjLj_RaiseException': > >/home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 10:38 AM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 06:37, Koning, Paul wrote: >> >>> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches >>> wrote: >>> >>> >>> On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 03:20:40PM +0900, Takayuki 'January June' Suwa wrote: > On 2022/10/14 8:56, Segher Boessenkool wrote: > > And finally, xtensa does > > /home/segher/src/gcc/libgcc/libgcc2.c:840:1: error: insn does not satisfy > > its constraints: > > 840 | } > > | ^ > > (insn 8 7 9

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 12:36:47AM +, Koning, Paul wrote: > I guess I'll have to look harder to see if it's possible to make LRA handle > CISC addressing modes like memory indirect, autoincrement, autodecrement, and > others that the old reload handles at least somewhat. Ideally LRA should d

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc/u

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/13/22 17:56, Segher Boessenkool wrote: >> >> h8300 fails during GCC build: >> /home/segher/src/gcc/libgcc/unwind.inc: In function >> '_Unwind_SjLj_RaiseException': >> /home/segher/src/gcc/libgcc/unwind.inc:141:1:

Re: [PATCH] Always enable LRA

2022-10-13 Thread Jeff Law via Gcc-patches
On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not split insn 141 | } | ^ (insn 69 256 327 (set (mem/f:SI (pre_de

Re: [PATCH] Always enable LRA

2022-10-13 Thread Jeff Law via Gcc-patches
On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not split insn 141 | } | ^ (insn 69 256 327 (set (mem/f:SI (pre_de

Re: [PATCH] Always enable LRA

2022-10-13 Thread Koning, Paul via Gcc-patches
> On Oct 13, 2022, at 7:56 PM, Segher Boessenkool > wrote: > > This small patch changes everything that checks targetm.lra_p behave as > if it returned true. > > It has no effect on any primary or secondary target. It also is fine > for nds32 and for nios2, and it works fine for microblaze