public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4254] Grow non_null_ref bitmap when num_ssa_names increases.
@ 2021-10-08 14:36 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-10-08 14:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:946486ab4f84a5380e1a18e37e4fb9614f5d7992

commit r12-4254-g946486ab4f84a5380e1a18e37e4fb9614f5d7992
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Oct 8 15:42:42 2021 +0200

    Grow non_null_ref bitmap when num_ssa_names increases.
    
    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.

Diff:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-08 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 14:36 [gcc r12-4254] 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).