public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Andrew MacLeod <amacleod@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Propagate value ranges of return values
Date: Mon, 20 Nov 2023 16:34:16 +0100	[thread overview]
Message-ID: <ZVt8eEmFMfkgTQsY@kam.mff.cuni.cz> (raw)
In-Reply-To: <598544a8-912b-49f2-a993-adf809889ce3@redhat.com>

> 
> On 11/18/23 20:21, Jan Hubicka wrote:
> > Hi,
> > this patch implements very basic propaation of return value ranges from VRP
> > pass.  This helps std::vector's push_back since we work out value range of
> > allocated block.  This propagates only within single translation unit.  I hoped
> > we will also do the propagation at WPA stage, but that needs more work on
> > ipa-cp side.
> > 
> > I also added code auto-detecting return_nonnull and corresponding -Wsuggest-attribute
> > 
> > Variant of this patch bootstrapped/regtested x86_64-linux, testing with
> > this version is running.  I plan to commit the patch at Monday provided
> > there are no issues.
> 
> I see no obvious issues with the ranger/vrp changes...
> 
> My only comment is that execute_ranger_vrp is called 3 times... EVRP,  VRP1
> and VRP2.. perhaps more someday.  As long as that is OK with the call to
> warn_function_returns_nonnull().
That should be OK.  Add the nonnull attribute and also local_pure_onst
behaves same way.

Honza
> 
> Andrew
> 
> 

      reply	other threads:[~2023-11-20 15:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-19  1:21 Jan Hubicka
2023-11-19 11:30 ` Sam James
2023-11-19 14:31   ` Jan Hubicka
2023-11-19 15:05     ` Jan Hubicka
2023-11-20 16:28       ` Martin Jambor
2023-11-21 11:09       ` Fix 'gcc.dg/tree-ssa/return-value-range-1.c' (was: Propagate value ranges of return values) Thomas Schwinge
2023-11-21 12:18         ` Jan Hubicka
2023-11-21 13:58       ` Propagate value ranges of return values Christophe Lyon
2023-11-21 14:06         ` Jan Hubicka
2023-11-21 21:35           ` Thomas Schwinge
2023-11-23  7:24           ` Andrew Pinski
2023-11-21 21:24       ` Fix 'gcc.dg/tree-ssa/return-value-range-1.c' for 'char' defaulting to 'unsigned' (was: Propagate value ranges of return values) Thomas Schwinge
2023-11-22 10:51         ` Christophe Lyon
2023-11-22 11:05           ` Thomas Schwinge
2023-11-22 17:16       ` Adjust 'libgomp.c/declare-variant-{3,4}-[...]' for inter-procedural value range propagation " Thomas Schwinge
2023-11-20 14:50 ` Propagate value ranges of return values Andrew MacLeod
2023-11-20 15:34   ` Jan Hubicka [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=ZVt8eEmFMfkgTQsY@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --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).