From: Andrew MacLeod <amacleod@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [COMMITTED] Change const basic_block to const_basic_block in gimple-range-cache.
Date: Fri, 30 Jul 2021 15:12:15 -0400 [thread overview]
Message-ID: <42538b34-2914-92ac-3d60-c5ea74dfb821@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
AS mentioned elsewhere, its const_basic_block not const basic_block.
bootstrapped on x86_64-pc-linux-gnu with no regressions. pushed.
Andrew
[-- Attachment #2: 0001-Change-const-basic_block-to-const_basic_block.patch --]
[-- Type: text/x-patch, Size: 6232 bytes --]
From d242acc396d645267cd1ccbdb4d0d73cc9b1ef48 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacleod@redhat.com>
Date: Thu, 29 Jul 2021 09:15:45 -0400
Subject: [PATCH 1/3] Change const basic_block to const_basic_block.
* gimple-range-cache.cc (*::set_bb_range): Change const basic_block to
const_basic_block..
(*::get_bb_range): Ditto.
(*::bb_range_p): Ditto.
* gimple-range-cache.h: Change prototypes.
---
gcc/gimple-range-cache.cc | 36 ++++++++++++++++++------------------
gcc/gimple-range-cache.h | 6 +++---
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index 265a64bacca..91541f12c3c 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -160,9 +160,9 @@ non_null_ref::process_name (tree name)
class ssa_block_ranges
{
public:
- virtual bool set_bb_range (const basic_block bb, const irange &r) = 0;
- virtual bool get_bb_range (irange &r, const basic_block bb) = 0;
- virtual bool bb_range_p (const basic_block bb) = 0;
+ virtual bool set_bb_range (const_basic_block bb, const irange &r) = 0;
+ virtual bool get_bb_range (irange &r, const_basic_block bb) = 0;
+ virtual bool bb_range_p (const_basic_block bb) = 0;
void dump(FILE *f);
};
@@ -193,9 +193,9 @@ class sbr_vector : public ssa_block_ranges
public:
sbr_vector (tree t, irange_allocator *allocator);
- virtual bool set_bb_range (const basic_block bb, const irange &r) OVERRIDE;
- virtual bool get_bb_range (irange &r, const basic_block bb) OVERRIDE;
- virtual bool bb_range_p (const basic_block bb) OVERRIDE;
+ virtual bool set_bb_range (const_basic_block bb, const irange &r) OVERRIDE;
+ virtual bool get_bb_range (irange &r, const_basic_block bb) OVERRIDE;
+ virtual bool bb_range_p (const_basic_block bb) OVERRIDE;
protected:
irange **m_tab; // Non growing vector.
int m_tab_size;
@@ -225,7 +225,7 @@ sbr_vector::sbr_vector (tree t, irange_allocator *allocator)
// Set the range for block BB to be R.
bool
-sbr_vector::set_bb_range (const basic_block bb, const irange &r)
+sbr_vector::set_bb_range (const_basic_block bb, const irange &r)
{
irange *m;
gcc_checking_assert (bb->index < m_tab_size);
@@ -243,7 +243,7 @@ sbr_vector::set_bb_range (const basic_block bb, const irange &r)
// there is no range.
bool
-sbr_vector::get_bb_range (irange &r, const basic_block bb)
+sbr_vector::get_bb_range (irange &r, const_basic_block bb)
{
gcc_checking_assert (bb->index < m_tab_size);
irange *m = m_tab[bb->index];
@@ -258,7 +258,7 @@ sbr_vector::get_bb_range (irange &r, const basic_block bb)
// Return true if a range is present.
bool
-sbr_vector::bb_range_p (const basic_block bb)
+sbr_vector::bb_range_p (const_basic_block bb)
{
gcc_checking_assert (bb->index < m_tab_size);
return m_tab[bb->index] != NULL;
@@ -281,9 +281,9 @@ class sbr_sparse_bitmap : public ssa_block_ranges
{
public:
sbr_sparse_bitmap (tree t, irange_allocator *allocator, bitmap_obstack *bm);
- virtual bool set_bb_range (const basic_block bb, const irange &r) OVERRIDE;
- virtual bool get_bb_range (irange &r, const basic_block bb) OVERRIDE;
- virtual bool bb_range_p (const basic_block bb) OVERRIDE;
+ virtual bool set_bb_range (const_basic_block bb, const irange &r) OVERRIDE;
+ virtual bool get_bb_range (irange &r, const_basic_block bb) OVERRIDE;
+ virtual bool bb_range_p (const_basic_block bb) OVERRIDE;
private:
void bitmap_set_quad (bitmap head, int quad, int quad_value);
int bitmap_get_quad (const_bitmap head, int quad);
@@ -342,7 +342,7 @@ sbr_sparse_bitmap::bitmap_get_quad (const_bitmap head, int quad)
// Set the range on entry to basic block BB to R.
bool
-sbr_sparse_bitmap::set_bb_range (const basic_block bb, const irange &r)
+sbr_sparse_bitmap::set_bb_range (const_basic_block bb, const irange &r)
{
if (r.undefined_p ())
{
@@ -368,7 +368,7 @@ sbr_sparse_bitmap::set_bb_range (const basic_block bb, const irange &r)
// there is no range.
bool
-sbr_sparse_bitmap::get_bb_range (irange &r, const basic_block bb)
+sbr_sparse_bitmap::get_bb_range (irange &r, const_basic_block bb)
{
int value = bitmap_get_quad (bitvec, bb->index);
@@ -386,7 +386,7 @@ sbr_sparse_bitmap::get_bb_range (irange &r, const basic_block bb)
// Return true if a range is present.
bool
-sbr_sparse_bitmap::bb_range_p (const basic_block bb)
+sbr_sparse_bitmap::bb_range_p (const_basic_block bb)
{
return (bitmap_get_quad (bitvec, bb->index) != 0);
}
@@ -417,7 +417,7 @@ block_range_cache::~block_range_cache ()
// If it has not been accessed yet, allocate it first.
bool
-block_range_cache::set_bb_range (tree name, const basic_block bb,
+block_range_cache::set_bb_range (tree name, const_basic_block bb,
const irange &r)
{
unsigned v = SSA_NAME_VERSION (name);
@@ -464,7 +464,7 @@ block_range_cache::query_block_ranges (tree name)
// is one.
bool
-block_range_cache::get_bb_range (irange &r, tree name, const basic_block bb)
+block_range_cache::get_bb_range (irange &r, tree name, const_basic_block bb)
{
ssa_block_ranges *ptr = query_block_ranges (name);
if (ptr)
@@ -475,7 +475,7 @@ block_range_cache::get_bb_range (irange &r, tree name, const basic_block bb)
// Return true if NAME has a range set in block BB.
bool
-block_range_cache::bb_range_p (tree name, const basic_block bb)
+block_range_cache::bb_range_p (tree name, const_basic_block bb)
{
ssa_block_ranges *ptr = query_block_ranges (name);
if (ptr)
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index f842e9c092a..1e77c9bf3a9 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -52,9 +52,9 @@ public:
block_range_cache ();
~block_range_cache ();
- bool set_bb_range (tree name, const basic_block bb, const irange &r);
- bool get_bb_range (irange &r, tree name, const basic_block bb);
- bool bb_range_p (tree name, const basic_block bb);
+ bool set_bb_range (tree name, const_basic_block bb, const irange &r);
+ bool get_bb_range (irange &r, tree name, const_basic_block bb);
+ bool bb_range_p (tree name, const_basic_block bb);
void dump (FILE *f);
void dump (FILE *f, basic_block bb, bool print_varying = true);
--
2.17.2
reply other threads:[~2021-07-30 19:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42538b34-2914-92ac-3d60-c5ea74dfb821@redhat.com \
--to=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).