public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"hernandez, aldy" <aldyh@redhat.com>, Jan Hubicka <jh@suse.cz>,
	Richard Biener <rguenther@suse.de>
Subject: Re: [COMMITTED] PR c++/106654 - Add assume support to VRP.
Date: Thu, 20 Oct 2022 10:22:59 +0200	[thread overview]
Message-ID: <Y1EFYwhqaRLZ8E/5@tucnak> (raw)
In-Reply-To: <8601499b-9b56-5ecd-4838-b9fbd120b043@redhat.com>

On Wed, Oct 19, 2022 at 08:37:57PM -0400, Andrew MacLeod wrote:
> This patch adds basic support for ASSUME functions to VRP.
> 
> Based on the previous set of patches, Ive cleaned them up, and this provides
> the basic support from rangers generalized model. It does not support
> non-ssa name parameters, I think you might be on your own for that.
> 
> I modified Jakubs assumption pass to use GORI to query parameter rangers in
> assumption functions and set the global range for those, and then ranger's
> infer infrastructure is used to inject these rangers at assume call
> locations in VRP.
> 
> I also added an optimization testcase that tests the basic functionality in
> VRP2.  For instance it can reduce:
> 
> int
> f2 (int x, int y, int z)
> {
>   [[assume (x+12 == 14 && y >= 0 && y + 10 < 13 && z + 4 >= 4 && z - 2 <
> 18)]];
>   unsigned q = x + y + z;
>   if (q*2 > 46)
>     return 0;
>   return 1;
> }
> 
> to:
> 
> return 1;
> 
> 
> Its good to get us going, bt I think theres still lots of room for
> improvement.
> 
> Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed.

Thanks.

	Jakub


      reply	other threads:[~2022-10-20  8:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  0:37 Andrew MacLeod
2022-10-20  8:22 ` Jakub Jelinek [this message]

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=Y1EFYwhqaRLZ8E/5@tucnak \
    --to=jakub@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jh@suse.cz \
    --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).