public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-3757] Allocate non_null_ref tables at creation.
Date: Tue, 21 Sep 2021 16:56:18 +0000 (GMT)	[thread overview]
Message-ID: <20210921165618.5760E385841A@sourceware.org> (raw)

https://gcc.gnu.org/g:08f392534a2c65fcebb1ce5a2f04459ac993a2f0

commit r12-3757-g08f392534a2c65fcebb1ce5a2f04459ac993a2f0
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Sep 21 08:26:50 2021 +0200

    Allocate non_null_ref tables at creation.
    
    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.

Diff:
---
 gcc/gimple-range-cache.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index fbf0f95eef9..b856b212169 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -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);
 }


                 reply	other threads:[~2021-09-21 16:56 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=20210921165618.5760E385841A@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@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).