* [COMMITTED] Implement irange::debug()
@ 2021-10-08 14:35 Aldy Hernandez
2021-10-08 14:35 ` [COMMITTED] Grow non_null_ref bitmap when num_ssa_names increases Aldy Hernandez
0 siblings, 1 reply; 2+ messages in thread
From: Aldy Hernandez @ 2021-10-08 14:35 UTC (permalink / raw)
To: GCC patches
Tested on x86-64 Linux.
gcc/ChangeLog:
* value-range.cc (irange::debug): New.
* value-range.h (irange::debug): New.
---
gcc/value-range.cc | 7 +++++++
gcc/value-range.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 147c4b04c1d..caef2498959 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -1999,6 +1999,13 @@ irange::dump (FILE *file) const
}
}
+void
+irange::debug () const
+{
+ dump (stderr);
+ fprintf (stderr, "\n");
+}
+
void
dump_value_range (FILE *file, const irange *vr)
{
diff --git a/gcc/value-range.h b/gcc/value-range.h
index ff6c0a6176d..32200ff890f 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -84,6 +84,7 @@ public:
// Misc methods.
bool fits_p (const irange &r) { return m_max_ranges >= r.num_pairs (); }
void dump (FILE * = stderr) const;
+ void debug () const;
// Deprecated legacy public methods.
enum value_range_kind kind () const; // DEPRECATED
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [COMMITTED] Grow non_null_ref bitmap when num_ssa_names increases.
2021-10-08 14:35 [COMMITTED] Implement irange::debug() Aldy Hernandez
@ 2021-10-08 14:35 ` Aldy Hernandez
0 siblings, 0 replies; 2+ messages in thread
From: Aldy Hernandez @ 2021-10-08 14:35 UTC (permalink / raw)
To: GCC patches
The strlen pass changes the IL as it works with the ranger. This
causes the non_null_ref code to sometimes get asked questions about new
SSA names.
Tested on x86-64 Linux.
gcc/ChangeLog:
* gimple-range-cache.cc (non_null_ref::non_null_deref_p): Grow
bitmap if needed.
---
gcc/gimple-range-cache.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index 7d994798e52..9cbc63d8a40 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -61,6 +61,9 @@ non_null_ref::non_null_deref_p (tree name, basic_block bb, bool search_dom)
return false;
unsigned v = SSA_NAME_VERSION (name);
+ if (v >= m_nn.length ())
+ m_nn.safe_grow_cleared (num_ssa_names + 1);
+
if (!m_nn[v])
process_name (name);
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-08 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 14:35 [COMMITTED] Implement irange::debug() Aldy Hernandez
2021-10-08 14:35 ` [COMMITTED] Grow non_null_ref bitmap when num_ssa_names increases Aldy Hernandez
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).