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] Move DCE's worklist from GC to malloced memory


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



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