From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57308 invoked by alias); 29 May 2015 13:34:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 57239 invoked by uid 89); 29 May 2015 13:34:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 29 May 2015 13:34:50 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 225D7AC66; Fri, 29 May 2015 13:34:47 +0000 (UTC) Message-ID: <55686AF6.9030805@suse.cz> Date: Fri, 29 May 2015 13:37:00 -0000 From: =?windows-1252?Q?Martin_Li=9Aka?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jeff Law , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 13/35] Change use to type-based pool allocator in df-problems.c. References: <83d59ba92a3c4b3ba831ebc2fce325f0416848d0.1432735040.git.mliska@suse.cz> <55660677.7020001@redhat.com> In-Reply-To: <55660677.7020001@redhat.com> Content-Type: multipart/mixed; boundary="------------020202020502080806060207" X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg02766.txt.bz2 This is a multi-part message in MIME format. --------------020202020502080806060207 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-length: 611 On 05/27/2015 08:01 PM, Jeff Law wrote: > On 05/27/2015 07:56 AM, mliska wrote: >> gcc/ChangeLog: >> >> 2015-04-30 Martin Liska >> >> * df-problems.c (df_chain_create):Use new type-based pool allocator. >> (df_chain_unlink_1) Likewise. >> (df_chain_unlink) Likewise. >> (df_chain_remove_problem) Likewise. >> (df_chain_alloc) Likewise. >> (df_chain_free) Likewise. >> * df.h (struct dataflow) Likewise. > OK. > > As Jakub noted, please double-check your ChangeLogs for proper formatting before committing. There's consistently nits to fix in them. > > Jeff > v2 --------------020202020502080806060207 Content-Type: text/x-patch; name="0012-Change-use-to-type-based-pool-allocator-in-df-proble.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0012-Change-use-to-type-based-pool-allocator-in-df-proble.pa"; filename*1="tch" Content-length: 3085 >From 66961142fc65ce20b326bb027c590a146736d2d3 Mon Sep 17 00:00:00 2001 From: mliska Date: Wed, 27 May 2015 15:56:48 +0200 Subject: [PATCH 12/32] Change use to type-based pool allocator in df-problems.c. gcc/ChangeLog: 2015-04-30 Martin Liska * df-problems.c (df_chain_create):Use new type-based pool allocator. (df_chain_unlink_1) Likewise. (df_chain_unlink) Likewise. (df_chain_remove_problem) Likewise. (df_chain_alloc) Likewise. (df_chain_free) Likewise. * df.h (struct dataflow) Likewise. --- gcc/df-problems.c | 14 +++++++------- gcc/df.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/df-problems.c b/gcc/df-problems.c index ff08abd..7700157 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -1879,7 +1879,7 @@ struct df_link * df_chain_create (df_ref src, df_ref dst) { struct df_link *head = DF_REF_CHAIN (src); - struct df_link *link = (struct df_link *) pool_alloc (df_chain->block_pool); + struct df_link *link = df_chain->block_pool->allocate (); DF_REF_CHAIN (src) = link; link->next = head; @@ -1904,7 +1904,7 @@ df_chain_unlink_1 (df_ref ref, df_ref target) prev->next = chain->next; else DF_REF_CHAIN (ref) = chain->next; - pool_free (df_chain->block_pool, chain); + df_chain->block_pool->remove (chain); return; } prev = chain; @@ -1924,7 +1924,7 @@ df_chain_unlink (df_ref ref) struct df_link *next = chain->next; /* Delete the other side if it exists. */ df_chain_unlink_1 (chain->ref, ref); - pool_free (df_chain->block_pool, chain); + df_chain->block_pool->remove (chain); chain = next; } DF_REF_CHAIN (ref) = NULL; @@ -1956,7 +1956,7 @@ df_chain_remove_problem (void) /* Wholesale destruction of the old chains. */ if (df_chain->block_pool) - free_alloc_pool (df_chain->block_pool); + delete df_chain->block_pool; EXECUTE_IF_SET_IN_BITMAP (df_chain->out_of_date_transfer_functions, 0, bb_index, bi) { @@ -2010,8 +2010,8 @@ static void df_chain_alloc (bitmap all_blocks ATTRIBUTE_UNUSED) { df_chain_remove_problem (); - df_chain->block_pool = create_alloc_pool ("df_chain_block pool", - sizeof (struct df_link), 50); + df_chain->block_pool = new pool_allocator ("df_chain_block pool", + 50); df_chain->optional_p = true; } @@ -2146,7 +2146,7 @@ df_chain_finalize (bitmap all_blocks) static void df_chain_free (void) { - free_alloc_pool (df_chain->block_pool); + delete df_chain->block_pool; BITMAP_FREE (df_chain->out_of_date_transfer_functions); free (df_chain); } diff --git a/gcc/df.h b/gcc/df.h index 7e233667..8a5b21f 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -305,7 +305,7 @@ struct dataflow unsigned int block_info_size; /* The pool to allocate the block_info from. */ - alloc_pool block_pool; + pool_allocator *block_pool; /* The lr and live problems have their transfer functions recomputed only if necessary. This is possible for them because, the -- 2.1.4 --------------020202020502080806060207--