From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7069 invoked by alias); 4 Apr 2011 19:25:18 -0000 Received: (qmail 7058 invoked by uid 22791); 4 Apr 2011 19:25:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Apr 2011 19:25:13 +0000 Received: (qmail 17176 invoked from network); 4 Apr 2011 19:25:13 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Apr 2011 19:25:13 -0000 Date: Mon, 04 Apr 2011 19:25:00 -0000 From: Nathan Froyd To: Steven Bosscher Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] allocate combine.c:LOG_LINKS in an alloc_pool Message-ID: <20110404192512.GD23480@codesourcery.com> References: <20110404184952.GA5423@nightcrawler> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00258.txt.bz2 On Mon, Apr 04, 2011 at 09:01:20PM +0200, Steven Bosscher wrote: > On Mon, Apr 4, 2011 at 8:49 PM, Nathan Froyd wrote: > > This patch does just what $SUBJECT suggests.  Benefits: > > > > - Smaller data structures in combine; > > - Freeing LOG_LINKS becomes much easier (don't have to transfer > >  everything to the INSN_LIST free list); > > > > Potential downsides: > > > > - Less sharing of INSN_LIST nodes might mean more cache thrashing. > > It looks like LOG_LINKs are allocated once. An alloc pool is > interesting if you allocate and free objects of the same size all the > time. In this case, I'd say an obstack would be a simpler and better > choice. FWIW, I went with alloc_pool because of the stats-for-free you get with appropriate configury. -Nathan