public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>
Cc: GCC patches <gcc-patches@gcc.gnu.org>,
	Jeff Law <jeffreyalaw@gmail.com>,
	Aldy Hernandez <aldyh@redhat.com>
Subject: [PATCH 1/7] Allocate non_null_ref tables at creation.
Date: Tue, 21 Sep 2021 18:53:44 +0200	[thread overview]
Message-ID: <20210921165350.414593-2-aldyh@redhat.com> (raw)
In-Reply-To: <20210921165350.414593-1-aldyh@redhat.com>

Preallocating the space is slightly cheaper than calling
safe_grow_cleared.

Committed.

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 | 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);
 }
 
-- 
2.31.1


  reply	other threads:[~2021-09-21 16:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 16:53 [PATCH 0/7] Add ability to resolve unknowns to path solver Aldy Hernandez
2021-09-21 16:53 ` Aldy Hernandez [this message]
2021-09-21 16:53 ` [PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available Aldy Hernandez
2021-09-21 17:05   ` Andrew MacLeod
2021-09-21 17:16     ` Aldy Hernandez
2021-09-22  8:05       ` Richard Biener
2021-09-23 11:07         ` Aldy Hernandez
2021-09-21 16:53 ` [PATCH 3/7] Move postfold_gcond_edges into fur_source Aldy Hernandez
2021-09-21 16:53 ` [PATCH 4/7] path solver: Add relation support Aldy Hernandez
2021-09-21 16:53 ` [PATCH 5/7] path solver: Remove useless code Aldy Hernandez
2021-09-21 16:53 ` [PATCH 6/7] path solver: Add related SSAs to solvable set Aldy Hernandez
2021-09-21 16:53 ` [PATCH 7/7] path solver: Use ranger to solve unknowns Aldy Hernandez

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=20210921165350.414593-2-aldyh@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    /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).