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]

tree-ssa*: reduce malloc() calls by preallocating hot VECs on the stack



2011-08-22 Dimitrios Apostolou <jimis@gmx.net>


	Allocate some very frequently used vectors on the stack:
	* vecir.h: Defined a tree vector on the stack.
	* tree-ssa-sccvn.c (print_scc, sort_scc, process_scc)
	(extract_and_process_scc_for_name): Allocate the scc vector on the
	stack instead of the heap, giving it a minimal initial size
	instead of 0.
	* tree-ssa-structalias.c (get_constraint_for_1)
	(get_constraint_for, get_constraint_for_rhs, do_deref)
	(get_constraint_for_ssa_var, get_constraint_for_ptr_offset)
	(get_constraint_for_component_ref, get_constraint_for_address_of)
	(process_all_all_constraints, do_structure_copy)
	(make_constraints_to, make_constraint_to, handle_rhs_call)
	(handle_lhs_call, handle_const_call, handle_pure_call)
	(find_func_aliases_for_builtin_call, find_func_aliases_for_call)
	(find_func_aliases, process_ipa_clobber, find_func_clobbers)
	(create_variable_info_for): Converted the rhsc, lhsc vectors from
	heap to stack, with a minimal initial size, since they were very
	frequently allocated.

Attachment: ssa-stackvectors.diff
Description: Text document


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