From: Jakub Jelinek <jakub@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: Richard Biener <rguenther@suse.de>,
Andrew MacLeod <amacleod@redhat.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]
Date: Tue, 17 Jan 2023 12:09:45 +0100 [thread overview]
Message-ID: <Y8aB+RZE+i9zMhkT@tucnak> (raw)
In-Reply-To: <a860b9fc-56b4-5ddb-47e5-471e0a3f0b19@redhat.com>
On Tue, Jan 17, 2023 at 11:59:53AM +0100, Aldy Hernandez wrote:
>
>
> On 1/17/23 10:47, Jakub Jelinek wrote:
>
> > Aldy/Andrew, is the ranger query ok or should I use something different
> > when check_range_stmt is non-NULL and I know on which statement to ask?
>
> <snip>
>
> > + int_range_max r;
> > + if (!get_global_range_query ()->range_of_expr (r, rotcnt,
> > + check_range_stmt))
> > + return false;
>
> range_of_expr will work with and without a statement. If no statement is
> provided, it will return the global range. So you can use the same
> range_of_expr call with a statement or without one if you don't know it.
>
> Note that get_global_range_query () will always return a global query object
> (think SSA_NAME_RANGE_INFO). It will never use an existing ranger (for
> example, if called within VRP or another pass that has an active ranger
> enabled). If simplify_rotate() may be used from some of these passes you
> *may* want to use get_range_query() which will pick up the active ranger, or
> a global query object if no ranger is active.
This is always in the forwprop pass.
I think it doesn't have any active ranger instance, but I could be wrong.
A question would be if it would be worth to activate it in this spot lazily
if it isn't active yet (and destruct at the end of the pass).
> For that matter, since get_global_range_query() uses a global query, it
> really doesn't matter if you pass a statement or not, since our global range
> store has no context (SSA_NAME_RANGE_INFO). Although, I personally always
> pass the statement if known, because it's good form, and if things ever
> change to an active ranger, everything will just work.
Jakub
next prev parent reply other threads:[~2023-01-17 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 9:47 Jakub Jelinek
2023-01-17 10:59 ` Aldy Hernandez
2023-01-17 11:09 ` Jakub Jelinek [this message]
2023-01-17 11:14 ` Aldy Hernandez
2023-01-17 11:19 ` Jakub Jelinek
2023-01-17 11:22 ` Aldy Hernandez
2023-01-17 11:33 ` Jakub Jelinek
2023-01-17 11:44 ` Aldy Hernandez
2023-01-17 11:04 ` Richard Biener
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=Y8aB+RZE+i9zMhkT@tucnak \
--to=jakub@redhat.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).