From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Introduce VIRTUAL_REGISTER_P and VIRTUAL_REGISTER_NUM_P predicates
Date: Wed, 19 Apr 2023 09:28:23 +0200 [thread overview]
Message-ID: <ZD+YF1FszBw8tu4f@tucnak> (raw)
In-Reply-To: <CAFULd4asDW=tezpyTxZ6hkUYqMR78h4WdRnXjF9prnskTpQwRw@mail.gmail.com>
On Wed, Apr 19, 2023 at 08:53:42AM +0200, Uros Bizjak wrote:
> On Tue, Apr 18, 2023 at 7:20 PM Jakub Jelinek <jakub@redhat.com> wrote:
> >
> > On Mon, Apr 17, 2023 at 11:27:28PM +0200, Uros Bizjak via Gcc-patches wrote:
> > > --- a/gcc/rtl.h
> > > +++ b/gcc/rtl.h
> > > @@ -1972,6 +1972,13 @@ set_regno_raw (rtx x, unsigned int regno, unsigned int nregs)
> > > /* 1 if the given register number REG_NO corresponds to a hard register. */
> > > #define HARD_REGISTER_NUM_P(REG_NO) ((REG_NO) < FIRST_PSEUDO_REGISTER)
> > >
> > > +/* 1 if the given register REG corresponds to a virtual register. */
> > > +#define VIRTUAL_REGISTER_P(REG) (VIRTUAL_REGISTER_NUM_P (REGNO (REG)))
> > > +
> > > +/* 1 if the given register number REG_NO corresponds to a virtual register. */
> > > +#define VIRTUAL_REGISTER_NUM_P(REG_NO) \
> > > + (IN_RANGE (REG_NO, FIRST_VIRTUAL_REGISTER, LAST_VIRTUAL_REGISTER))
> >
> > Why the ()s around both definitions?
> > IN_RANGE adds its own and anything on top of that is just superfluous.
>
> Mainly to imitate the surrounding code (e.g. HARD_REGISTER_P) that is
> quite generous with brackets.
>
> I can remove external brackets from both definitions, but I'd remove
> them also from the HARD_REGISTER_P definition.
Please do. HARD_REGISTER_NUM_P obviously needs to keep it.
Jakub
prev parent reply other threads:[~2023-04-19 7:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 21:27 Uros Bizjak
2023-04-18 17:17 ` Jeff Law
2023-04-18 17:20 ` Jakub Jelinek
2023-04-19 6:53 ` Uros Bizjak
2023-04-19 7:28 ` Jakub Jelinek [this message]
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=ZD+YF1FszBw8tu4f@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ubizjak@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).