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]

[PATCH] Move DCE's worklist from GC to malloced memory


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.

Attachment: moveWorksetDCE.diff.txt
Description: Text document


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