]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Allocate non_null_ref tables at creation.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 21 Sep 2021 06:26:50 +0000 (08:26 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 21 Sep 2021 16:55:13 +0000 (18:55 +0200)
Preallocating the space is slightly cheaper than calling
safe_grow_cleared.

gcc/ChangeLog:

* gimple-range-cache.cc (non_null_ref::non_null_ref): Use create
and quick_grow_cleared instead of safe_grow_cleared.

gcc/gimple-range-cache.cc

index fbf0f95eef90203d65d9bbfc150d5c0e449933fc..b856b212169bf60e31f028b05186c7b9aec1b83d 100644 (file)
@@ -37,8 +37,8 @@ along with GCC; see the file COPYING3.  If not see
 
 non_null_ref::non_null_ref ()
 {
-  m_nn.create (0);
-  m_nn.safe_grow_cleared (num_ssa_names);
+  m_nn.create (num_ssa_names);
+  m_nn.quick_grow_cleared (num_ssa_names);
   bitmap_obstack_initialize (&m_bitmaps);
 }