From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 5760E385841A; Tue, 21 Sep 2021 16:56:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5760E385841A MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3757] Allocate non_null_ref tables at creation. X-Act-Checkin: gcc X-Git-Author: Aldy Hernandez X-Git-Refname: refs/heads/master X-Git-Oldrev: 303b5d874720aa1830c696a20e1e03abc1a12e14 X-Git-Newrev: 08f392534a2c65fcebb1ce5a2f04459ac993a2f0 Message-Id: <20210921165618.5760E385841A@sourceware.org> Date: Tue, 21 Sep 2021 16:56:18 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 16:56:18 -0000 https://gcc.gnu.org/g:08f392534a2c65fcebb1ce5a2f04459ac993a2f0 commit r12-3757-g08f392534a2c65fcebb1ce5a2f04459ac993a2f0 Author: Aldy Hernandez 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); }