This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Move DCE's worklist from GC to malloced memory
- From: Jeffrey A Law <law at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Nov 2004 20:35:38 -0700
- Subject: Re: [PATCH] Move DCE's worklist from GC to malloced memory
- Organization: Red Hat, Inc
- References: <AB6AF536-4002-11D9-941D-000A95D692F4@physics.uc.edu>
- Reply-to: law at redhat dot com
On Fri, 2004-11-26 at 18:26 -0500, Andrew Pinski wrote:
> I have a couple of these moving worklists from GC memory to malloced
> memory patches, at the same time I moved them to use VEC instead
> of varray_type which should give a compile time speedup.
>
> This patch moves the tree-ssa-dce's worklist to malloced memory
> so that we don't allocate too much in the GC memory and since we
> know the life time of the array and we know that we will not call
> ggc_collect inbetween and we will still have reference to trees which
> is contained in the vector.
>
> OK? Bootstrapped and tested on ppc-darwin.
>
> This reduces the overall GC memory but I don't remember by how much.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
>
> * tree-ssa-dce.c (worklist): Change type to VEC(tree_on_heap)*.
> (mark_stmt_necessary): Call the VEC code instead of the VARRAY code.
> (mark_operand_necessary): Likewise.
> (propagate_necessity): Likewise.
> (mark_really_necessary_kill_operand_phis): Likewise.
> (tree_dce_init): Allocate worklist with the VEC code.
> (tree_dce_done): Free the worklist.
Were you able to measure any kind of speedup? We're at a stage
where I think each change we install ought to have some kind of
measurable improvement -- simply moving allocations from one
pool of memory to another isn't IMHO enough to justify the patch
at this time.
jeff