public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [committed] Convert xstormy16 to LRA
@ 2023-05-01 23:37 Roger Sayle
  2023-05-02 12:40 ` Paul Koning
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Roger Sayle @ 2023-05-01 23:37 UTC (permalink / raw)
  To: 'Jeff Law'; +Cc: 'GCC Patches', 'Segher Boessenkool'


Jeff Law wrote:
> This patch converts the xstormy16 patch to LRA.  It introduces a code 
> quality regression in the shiftsi testcase, but it also fixes numerous 
> aborts/errors.  IMHO it's a good tradeoff.

I've investigated the shiftsi regression on xstormy16 and the underlying
cause
appears to be an interaction between lower-subreg's "subreg3" pass and the
new LRA.  Previously, reload was not phased by the "clobbers" that are 
introduced by the decompose_multiword_subregs function, but they appear
to interfere with LRA's register assignments.

combine's make_extra_copies introduces a new pseudo-to-pseudo move,
but when subreg3 inserts a naked clobber between the original and the
new move, LRA is recombine theses pseudos back to the same allocno.

The shiftsi.cc regression on xstormy16 is fixed by adding
-fno-split-wide-types.
In fact, if all the regression tests pass, I'd suggest that
flag_split_wide-types = false
should be the default on xstormy16 now that we've moved to LRA.  And if this
works for xstormy16, it might be useful to other targets for the LRA
transition;
it's a difference in behaviour between reload and LRA that could potentially
affect multiple targets.

For reference, xstormy16 has a post-reload define_insn_and_split for movsi
(i.e. a multi-word move).  If this insn was split during split1 (i.e. before
subreg3)
there wouldn't be a problem (no clobber), but alas the target's
xstormy16_split_move
function has several asserts insisting this only get called when
reload_completed.

I hope this is useful.
Cheers,
Roger
--



^ permalink raw reply	[flat|nested] 19+ messages in thread
* [committed] Convert xstormy16 to LRA
@ 2023-05-01 13:42 Jeff Law
  0 siblings, 0 replies; 19+ messages in thread
From: Jeff Law @ 2023-05-01 13:42 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

This patch converts the xstormy16 patch to LRA.  It introduces a code 
quality regression in the shiftsi testcase, but it also fixes numerous 
aborts/errors.  IMHO it's a good tradeoff.

Committed to the trunk,
Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1045 bytes --]

commit 977a3be3ccbc7f177316b2b349523023cac37bcd
Author: Jeff Law <jlaw@ventanamicro>
Date:   Mon May 1 07:40:38 2023 -0600

    Convert xstormy16 to LRA
    
    This patch converts the xstormy16 patch to LRA.  It introduces a code
    quality regression in the shiftsi testcase, but it also fixes numerous
    aborts/errors.  IMHO it's a good tradeoff.
    
    gcc/
    
            * config/stormy16/stormy16.cc (TARGET_LRA_P): Remove defintion.

diff --git a/gcc/config/stormy16/stormy16.cc b/gcc/config/stormy16/stormy16.cc
index 98f87fa8251..81b32dbc958 100644
--- a/gcc/config/stormy16/stormy16.cc
+++ b/gcc/config/stormy16/stormy16.cc
@@ -2894,9 +2894,6 @@ xstormy16_push_rounding (poly_int64 bytes)
 #undef  TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS xstormy16_preferred_reload_class
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
-
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	xstormy16_legitimate_address_p
 #undef TARGET_MODE_DEPENDENT_ADDRESS_P

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-05-13  1:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 23:37 [committed] Convert xstormy16 to LRA Roger Sayle
2023-05-02 12:40 ` Paul Koning
2023-05-02 13:18   ` Roger Sayle
2023-05-02 13:49     ` Segher Boessenkool
2023-05-02 16:20       ` Roger Sayle
2023-05-02 21:55         ` Segher Boessenkool
2023-05-02 14:11     ` Paul Koning
2023-05-02 15:47       ` Segher Boessenkool
2023-05-02 15:57 ` Jeff Law
2023-05-11 15:05 ` Hans-Peter Nilsson
2023-05-11 16:55   ` Paul Koning
2023-05-11 18:15     ` Jeff Law
2023-05-11 18:32       ` Hans-Peter Nilsson
2023-05-12 13:53   ` Hans-Peter Nilsson
2023-05-12 14:01     ` Hans-Peter Nilsson
2023-05-12 14:04     ` Roger Sayle
2023-05-13  0:56       ` Hans-Peter Nilsson
2023-05-13  1:11         ` Hans-Peter Nilsson
  -- strict thread matches above, loose matches on Subject: below --
2023-05-01 13:42 Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).