From: Segher Boessenkool <segher@kernel.crashing.org>
To: Paul Koning <paulkoning@comcast.net>
Cc: Senthil Kumar Selvaraj <senthil.thecoder@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Denis Chertykov <chertykov@gmail.com>,
Ilias Lazaridis <lazaridis.com+abebeos@gmail.com>
Subject: Re: [PATCH] avr: cc0 to mode_cc conversion
Date: Fri, 18 Dec 2020 03:13:51 -0600 [thread overview]
Message-ID: <20201218091351.GP2672@gate.crashing.org> (raw)
In-Reply-To: <681759BA-E38E-4E29-AF8F-2175342818C1@comcast.net>
On Thu, Dec 17, 2020 at 10:07:22AM -0500, Paul Koning wrote:
> > On Dec 17, 2020, at 6:21 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> > On Thu, Dec 17, 2020 at 02:15:51PM +0530, Senthil Kumar Selvaraj via Gcc-patches wrote:
> >> The work on my github branch was not complete - I'd blindly followed
> >> whatever the CC0 Transition wiki mentioned (the first three steps of
> >> case #2), and fixed any regression fallout (for ATmega128).
> >>
> >> I intend to try out a define_subst/early clobber of reg_cc based
> >> approach (inspired by the cris port) and see if that can help avoid the
> >> proliferation of define_insn_and_splits. Will update how that works out.
> >
> > Yeah, case #2 does not necessarily give the best result, but it usually
> > is the least work to do, so certainly a good choice under time pressure.
>
> I was under the impression from what I read in the blog a year or two ago (when I did the pdp11 ccmode work) that "case 2" is the better answer for machines in which pretty much every operation touches the condition codes. In other words, I understood that case 1 would for such machines not be the right answer -- it wasn't just that "case 2 is easier".
>
> Did I misunderstand? Is there a reason for machines such as pdp11, in which basically every operation that handles data, even a move instruction, touches CC, to use approach 1?
No, you didn't misunderstand. I said "not necessarily" for a reason :-)
If there are move insns that do *not* clobber CC, it can be different,
but if even move instructions do, a case #2 conversion is a good choice.
(This is all my opinion, but I think it is not controversial.)
Segher
next prev parent reply other threads:[~2020-12-18 9:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 18:51 Georg-Johann Lay
2020-12-13 21:49 ` abebeos
2020-12-17 8:45 ` Senthil Kumar Selvaraj
2020-12-17 11:21 ` Segher Boessenkool
2020-12-17 15:07 ` Paul Koning
2020-12-18 9:13 ` Segher Boessenkool [this message]
2020-12-18 17:13 ` Georg-Johann Lay
2020-12-18 18:28 ` Segher Boessenkool
2020-12-18 21:38 ` abebeos
2021-01-05 13:54 ` Senthil Kumar Selvaraj
2021-01-05 19:06 ` Paul Koning
-- strict thread matches above, loose matches on Subject: below --
2020-12-12 4:49 abebeos
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=20201218091351.GP2672@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=chertykov@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=lazaridis.com+abebeos@gmail.com \
--cc=paulkoning@comcast.net \
--cc=senthil.thecoder@gmail.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).