From: Aldy Hernandez <aldyh@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: VRP: abstract out wide int CONVERT_EXPR_P code
Date: Tue, 28 Aug 2018 09:31:00 -0000 [thread overview]
Message-ID: <7588d9ab-348a-6360-c79c-e6afcc85c3a3@redhat.com> (raw)
In-Reply-To: <CAFiYyc1nE8qiD6E__LyRRFYwdjmvrs4vGWU9k-dJC+0rgNtQpg@mail.gmail.com>
On 08/28/2018 05:27 AM, Richard Biener wrote:
> On Mon, Aug 27, 2018 at 2:24 PM Aldy Hernandez <aldyh@redhat.com> wrote:
>>
>> Howdy!
>>
>> Phew, I think this is the last abstraction. This handles the unary
>> CONVERT_EXPR_P code.
>>
>> It's the usual story-- normalize the symbolics to [-MIN,+MAX] and handle
>> everything generically.
>>
>> Normalizing the symbolics brought about some nice surprises. We now
>> handle a few things we were punting on before, which I've documented in
>> the patch, but can remove if so desired. I wrote them mainly for myself:
>>
>> /* NOTES: Previously we were returning VARYING for all symbolics, but
>> we can do better by treating them as [-MIN, +MAX]. For
>> example, converting [SYM, SYM] from INT to LONG UNSIGNED,
>> we can return: ~[0x8000000, 0xffffffff7fffffff].
>>
>> We were also failing to convert ~[0,0] from char* to unsigned,
>> instead choosing to return VR_VARYING. Now we return ~[0,0]. */
>>
>> Tested on x86-64 by the usual bootstrap and regtest gymnastics,
>> including --enable-languages=all, because my past sins are still
>> haunting me.
>>
>> OK?
>
> The new wide_int_range_convert_tree looks odd given it returns
> tree's. I'd have expected an API that does the conversion resulting
> in a wide_int range and the VRP code adapting to that by converting
> the result to trees.
Hmmm, yeah. I agree. I'll think about this some more and see what I
can come up with.
Thanks.
Aldy
next prev parent reply other threads:[~2018-08-28 9:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 12:24 Aldy Hernandez
2018-08-28 9:27 ` Richard Biener
2018-08-28 9:31 ` Aldy Hernandez [this message]
2018-09-03 11:32 ` Aldy Hernandez
2018-09-04 11:58 ` Richard Biener
2018-09-04 12:41 ` Aldy Hernandez
2018-09-04 12:50 ` Richard Biener
2018-09-04 14:12 ` Aldy Hernandez
2018-09-04 14:21 ` Richard Biener
2018-09-04 14:25 ` Aldy Hernandez
2018-09-04 14:35 ` Aldy Hernandez
2018-09-05 12:58 ` Michael Matz
2018-09-05 14:01 ` Aldy Hernandez
2018-09-05 14:57 ` Michael Matz
2018-09-05 18:00 ` Aldy Hernandez
2018-08-29 14:13 ` Bernhard Reutner-Fischer
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=7588d9ab-348a-6360-c79c-e6afcc85c3a3@redhat.com \
--to=aldyh@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).