This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SSA range class and removal of VR_ANTI_RANGEs
- From: Jeff Law <law at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>, Aldy Hernandez <aldyh at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Jun 2017 20:43:13 -0600
- Subject: Re: SSA range class and removal of VR_ANTI_RANGEs
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 617E88553D
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 617E88553D
- References: <dbad7708-d495-402c-c9d8-626a9c8202b9@redhat.com> <61874a60-61e1-1dc1-6b12-e0d69aaf2cde@acm.org>
On 05/23/2017 05:28 AM, Nathan Sidwell wrote:
> On 05/23/2017 06:48 AM, Aldy Hernandez wrote:
>
>> The class can live outside of his work, as can be demonstrated by the
>> attached patch. With it, I was able to rewrite the post-VRP range
>> information to use this class and get rid of VR_ANTI_RANGE throughout
>> the compiler. A VR_ANTI_RANGE of ~[5,10] becomes [-MIN,4][11,+MAX].
>
> Seems useful.
That's the idea :-)
The general consensus is that ANTI ranges are just painful to support
and they can be represented as two distinct sub-intervals -- and we know
how to operate on those subintervals reasonably well.
I haven't looked at the this version of the patch, but earlier versions
did show how dropping anti range support and instead using the new
representation cleaned things up considerably.
In reality I suspect the only really important anti range is ~[0,0]
anyway. Everything else is likely small potatoes.
>
>> + /* Remove negative numbers from the range. */
>> + irange positives;
>> + range_positives (&positives, exptype, allow_zero ? 0 : 1);
>
> 'allow_zero ? 0 : 1' looks mighty strange. I know that's a nit, but you
> placed it front and centre!
>
>> + if (positives.Intersect (*ir))
>
> I notice you have a number of Uppercase member fns ...
Aldy, this ought to get fixed :-)
jeff