From: Aldy Hernandez <aldyh@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Add stmt context in simplify_using_ranges.
Date: Wed, 30 Jun 2021 08:20:18 +0200 [thread overview]
Message-ID: <f1784256-2da6-b208-9c3d-7ab1b2fb4d66@redhat.com> (raw)
In-Reply-To: <fe4971e0-3819-2601-8390-3bebcf704cc0@redhat.com>
On 6/29/21 9:09 PM, Andrew MacLeod wrote:
> We added context to a lot of simplify_using_ranges, but we didn't catch
> all the places. This provides the originating stmt to the missing
> cases which resolve a few EVRP testcases when running in ranger-only mode.
>
> Bootstraps on x86_64-pc-linux-gnu with no regressions. Pushed.
>
> Andrew
>
>
Thanks for doing this. I've done a half-assed job at passing context
around; probably only when it yielded a discrepancy with evrp.
>
> bool
> -simplify_using_ranges::op_with_boolean_value_range_p (tree op)
> +simplify_using_ranges::op_with_boolean_value_range_p (tree op, gimple *s)
> {
> if (TYPE_PRECISION (TREE_TYPE (op)) == 1)
>
I know you like single letter arguments, but I find them confusing when
the method is more than a few lines long. Besides, "stmt" is what is
used throughout vr-values.c.
And speaking of passing statements around, I wonder if it'd be best to
have m_stmt and possible m_gsi as class fields. After all, we never
change them, and they're used by most methods.
Aldy
next prev parent reply other threads:[~2021-06-30 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 19:09 Andrew MacLeod
2021-06-30 6:20 ` Aldy Hernandez [this message]
2021-06-30 13:25 ` Andrew MacLeod
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=f1784256-2da6-b208-9c3d-7ab1b2fb4d66@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).