[PATCH] Turn on LRA on all targets
Maciej W. Rozycki
macro@orcam.me.uk
Mon May 15 21:09:12 GMT 2023
On Sun, 23 Apr 2023, Segher Boessenkool wrote:
> > There are extra ICEs in regression testing and code quality is poor; cf.
> > <https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588296.html>.
>
> Do you have something you can show for this? Maybe in a PR?
I have filed no PRs as I didn't assess the collateral damage at the time
I looked at it. I only ran regression-testing with `-mlra' shortly after
I completed MODE_CC conversion and added the option, to see what lies
beyond. And I only added `-mlra' and made minimal changes to make the
compiler build again just to make it easier to proceed towards LRA.
> And, are the ICEs in the generic code, or something vax-specific?
At least some were in generic code, e.g.:
during RTL pass: combine
.../gcc/testsuite/gcc.c-torture/compile/pr101562.c: In function 'foo':
.../gcc/testsuite/gcc.c-torture/compile/pr101562.c:12:1: internal compiler error: in insert, at wide-int.cc:682
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
compiler exited with status 1
FAIL: gcc.c-torture/compile/pr101562.c -O1 (internal compiler error)
FAIL: gcc.c-torture/compile/pr101562.c -O1 (test for excess errors)
(coming from `gcc_checking_assert (precision >= width)'), or:
In file included from .../gcc/testsuite/g++.dg/modules/xtreme-header-2.h:10,
from .../gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H:4:
.../vax-netbsdelf/libstdc++-v3/include/regex:42: internal compiler error: in set_filename, at cp/module.cc:19134
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
compiler exited with status 1
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2b (internal compiler error)
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2b (test for excess errors)
(from `gcc_checking_assert (!filename)'). As I say, I did not assess this
at all back then and the logs are dated Nov 2021 (I had to chase them).
Also I'm not going to dedicate any time now to switch the VAX backend to
LRA, because old reload continues working while we have a non-functional
exception unwinder that never ever worked, as I have recently discovered,
which breaks lots of C++ code, including in particular native VAX/NetBSD
GDB and `gdbserver' (my newly-ported implementation of), which is a bit of
a problem (native VAX/NetBSD GCC has been spared owing to the decision not
to use exceptions).
And fixing the unwinder is going to be a major effort due to how the VAX
CALLS machine instruction works and the stack frame has been consequently
structured; it is unlike any other ELF target, and even if it can be
expressed in DWARF terms (which I'm not entirely sure about), it is going
to require a dedicated handler like with ARM or IA64.
I may choose to implement a non-DWARF unwinder instead, as the VAX stack
frame is always fully described by the hardware and there is never ever a
need for debug information to be able to decode any VAX stack frame (the
RET machine instruction uses the stack frame information to restore the
previous PC, FP, SP, AP and any static registers saved by CALLS).
So implementing a working exception unwinder has to take precedence over
LRA and I do hope to complete it during this release cycle, but I may not
have any time left for LRA.
Please keep this in mind with any plans to drop old reload. I'll highly
appreciate that and I do keep LRA on my radar as the next item to address
after the unwinder, by any means it's not been lost.
Maciej
More information about the Gcc-patches
mailing list