From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Aldy Hernandez <aldyh@redhat.com>,
Andrew MacLeod <amacleod@redhat.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Avoid generating useless range info
Date: Fri, 23 Jun 2017 10:32:00 -0000 [thread overview]
Message-ID: <20170623103201.GC2123@tucnak> (raw)
In-Reply-To: <CAFiYyc10Qfnjgo9cgeOtPUbiy=vQ7Dx1CRgabVkyV3iAci3VrA@mail.gmail.com>
On Fri, Jun 23, 2017 at 12:24:25PM +0200, Richard Biener wrote:
> > void
> > set_nonzero_bits (tree name, const wide_int_ref &mask)
> > {
> > gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name)));
> > if (SSA_NAME_RANGE_INFO (name) == NULL)
> > set_range_info (name, VR_RANGE,
> > TYPE_MIN_VALUE (TREE_TYPE (name)),
> > TYPE_MAX_VALUE (TREE_TYPE (name)));
> > range_info_def *ri = SSA_NAME_RANGE_INFO (name);
> > ri->set_nonzero_bits (mask);
> > }
> >
> > Let me know how you'd like me to proceed.
>
> Just factor out a set_range_info_raw and call that then from here.
And don't call it if the mask is all ones. Perhaps set_range_info
and set_nonzero_bits even should ggc_free and clear earlier range_info_def
if the range is all values and nonzero bit mask is all ones.
Or do we share range_info_def between multiple SSA_NAMEs? If yes, of course
we shouldn't use ggc_free.
Jakub
next prev parent reply other threads:[~2017-06-23 10:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 16:41 Aldy Hernandez
2017-06-16 8:00 ` Richard Biener
2017-06-23 9:02 ` Aldy Hernandez
[not found] ` <CAGm3qMXOYa3Km6FGiji0j2txeZJfyiLTR7V6EDMTDEDQo0RWBA@mail.gmail.com>
2017-06-23 10:24 ` Richard Biener
2017-06-23 10:32 ` Jakub Jelinek [this message]
2017-06-23 11:01 ` Richard Biener
2017-06-27 10:26 ` Aldy Hernandez
2017-06-27 10:38 ` Jakub Jelinek
2017-06-28 7:56 ` Aldy Hernandez
2017-06-29 9:53 ` Richard Biener
2017-08-02 13:29 ` [testsuite, committed] Use relative line number in gcc.dg/Walloca-14.c Tom de Vries
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=20170623103201.GC2123@tucnak \
--to=jakub@redhat.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@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).