public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>,
	Andrew MacLeod <amacleod@redhat.com>
Cc: Jeff Law <jeffreyalaw@gmail.com>, Martin Sebor <msebor@redhat.com>
Subject: Re: [PATCH 1/5] Common API for accessing global and on-demand ranges.
Date: Mon, 24 May 2021 18:09:46 +0200	[thread overview]
Message-ID: <71bc0536-573b-a389-89f5-f13f5763d3df@redhat.com> (raw)
In-Reply-To: <20210521113954.1148075-1-aldyh@redhat.com>



On 5/21/21 1:39 PM, Aldy Hernandez wrote:
> This patch provides a generic API for accessing global ranges.  It is
> meant to replace get_range_info() and get_ptr_nonnull() with one
> common interface.  It uses the same API as the ranger (class
> range_query), so there will now be one API for accessing local and
> global ranges alike.
> 
> Follow-up patches will convert all users of get_range_info and
> get_ptr_nonnull to this API.
> 
> For get_range_info, instead of:
> 
>    if (!POINTER_TYPE_P (TREE_TYPE (name)) && SSA_NAME_RANGE_INFO (name))
>      get_range_info (name, vr);
> 
> You can now do:
> 
>    RANGE_QUERY (cfun)->range_of_expr (vr, name, [stmt]);

BTW, we're not wed to the idea of putting the current range object in 
cfun.  The important thing is that the API is consistent across, not 
where it lives.

We're open to suggestions: a global variable, cfun, the pass manager, or 
even a pass property:

   ( PROP_blah | PROP_ranger ), /* properties_required */

I personally like cfun, but we're open to suggestions.

Aldy


  parent reply	other threads:[~2021-05-24 16:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 11:39 Aldy Hernandez
2021-05-21 11:39 ` [PATCH 2/5] Convert Walloca pass to RANGE_QUERY(cfun) Aldy Hernandez
2021-05-25  8:43   ` Richard Biener
2021-05-25 16:17   ` Aldy Hernandez
2021-05-25 16:28     ` Jeff Law
2021-05-25 17:28     ` Martin Sebor
2021-05-27  7:38     ` Christophe Lyon
2021-05-27  8:34       ` Aldy Hernandez
2021-05-21 11:39 ` [PATCH 3/5] Convert evrp " Aldy Hernandez
2021-05-25 16:18   ` Aldy Hernandez
2021-05-27  2:34     ` H.J. Lu
2021-05-21 11:39 ` [PATCH 4/5] Convert remaining passes to RANGE_QUERY Aldy Hernandez
2021-05-24 19:34   ` Martin Sebor
2021-05-25  8:47     ` Richard Biener
2021-05-25  9:15       ` Aldy Hernandez
2021-05-25 11:26       ` Aldy Hernandez
2021-05-25  8:48     ` Aldy Hernandez
2021-05-25 16:19   ` Aldy Hernandez
2021-05-21 11:39 ` [PATCH 5/5] Cleanup get_range_info Aldy Hernandez
2021-05-25 16:20   ` Aldy Hernandez
2021-05-24 16:09 ` Aldy Hernandez [this message]
2021-05-25  8:57   ` [PATCH 1/5] Common API for accessing global and on-demand ranges Richard Biener
2021-05-25  9:36     ` Aldy Hernandez
2021-05-25  9:46       ` Richard Biener
2021-05-25 10:53         ` Aldy Hernandez
2021-05-25 11:06           ` Richard Biener
2021-05-25 16:16             ` Aldy Hernandez
2021-05-26 13:40               ` Andrew MacLeod
2021-05-29  4:35               ` Jeff Law
2021-05-24 19:13 ` Martin Sebor
2021-05-25  7:06   ` Aldy Hernandez

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=71bc0536-573b-a389-89f5-f13f5763d3df@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=msebor@redhat.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).