From: Hans-Peter Nilsson <hp@bitrange.com>
To: Jeff Law <law@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: H8 cc0 conversion
Date: Mon, 23 Nov 2020 23:49:16 -0500 (EST) [thread overview]
Message-ID: <alpine.BSF.2.20.16.2011232340010.1005@arjuna.pair.com> (raw)
In-Reply-To: <97ecedff-d840-a5cc-8178-39ce8e2175c5@redhat.com>
On Sun, 22 Nov 2020, Jeff Law via Gcc-patches wrote:
> This is the primary patch for cc0 removal on the H8 port.? It doesn't
> have any of the optimization work and many patterns are simply disabled
> at this time.? It's working well enough to not regress the testsuite.
>
> The H8 is similar to the m68k and other ports in that the vast majority
> of instructions clobber the condition codes, including most of the
> arithmetic insns that reload needs to use. While there's a special
> adds/subs that does not modify the condition codes, they only accept
> constant addends of 1, 2 and 4. With that in mind, this port does not
> expose cc0 until after reload. So most patterns are defined using
> define_insn_and_split. The splitter adds the appropriate clobbers.
JFTR (as I'm repeating a previous note for another port): if
you'd went for exposing cc0 *before* reload (adding a clobber to
each pattern that clobbers, then specifying exceptions removing
them), the amount of (required) define_insn_and_splits would
have been zero; typically much less churn in the port. That
approach also has the benefit of insns not "silently" changing
behavior at reload-time.
You might think a parallel with a clobber for each insn hampers
some rtl optimizations, but I found that to be not an issue at
all, doing that for CRIS (at least when comparing to the cc0
version).
brgds, H-P
next prev parent reply other threads:[~2020-11-24 4:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 19:27 Jeff Law
2020-11-24 4:49 ` Hans-Peter Nilsson [this message]
2020-11-24 5:50 ` Jeff Law
2020-11-24 10:02 ` Hans-Peter Nilsson
2020-11-24 11:08 ` Eric Botcazou
2020-11-24 15:23 ` Jeff Law
2020-11-25 22:05 ` Hans-Peter Nilsson
2020-11-28 18:44 ` Paul Koning
2020-12-04 16:03 ` Maciej W. Rozycki
2020-12-08 5:43 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.BSF.2.20.16.2011232340010.1005@arjuna.pair.com \
--to=hp@bitrange.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).