This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] allocate combine.c:LOG_LINKS in an alloc_pool


On Mon, Apr 4, 2011 at 9:25 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Mon, Apr 04, 2011 at 09:01:20PM +0200, Steven Bosscher wrote:
>> On Mon, Apr 4, 2011 at 8:49 PM, Nathan Froyd <froydnj@codesourcery.com> 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.

I agree with Steven - alloc-pools have higher overhead because they
deal with memory re-use which you don't appearantly need.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]