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 superblock formation to Tree-SSA


Here is a revised version of the patch to move Superblock formation to Tree-SSA. I believe this addresses most of the feedback from the earlier version.

This patch moves the Superblock formation pass to after the first DCE pass in Tree-SSA. I tested versions running Superblock formation after build_ssa, after ccp, and after dce. Forming Superblocks after ccp performed better than after build_ssa, and forming them after dce performed better than that. This patch improves performance 1-2% over the earlier version. Full SPEC results are at http:// www.crhc.uiuc.edu/~rkidd/spec-tracer.html.

Moving Superblock formation to the Tree-SSA level does not degrade the run time of GCC. I collected the output of -ftime-report for a SPEC2000 run on IA64 with and without the patch. When doing profiling, the mean run time of the patched GCC is 0.99 times that of the standard. When forming Superblocks without profile feedback, the run time is 0.97 times stock. I considered only run times longer than five seconds in these calculations.

As for the performance of the compiled program, the mean difference in SPEC performance is in the noise. There's a slight decrease for SPECint when profiling, and a slight increase in SPECfp without profiling. mcf, swim, art, and lucas all improve by about 5% when we're not doing profiling, which is surprising. The decrease in performance for twolf is still there. I'm looking into the degraded benchmarks. SPEC results are available at http://www.crhc.uiuc.edu/ ~rkidd/spec-20070212-web.html.

This version of the patch still deletes dominance info after creating Superblocks. I'm working on a version that updates dominators on the fly, but I still hit some ICEs with that version.

This patch bootstraps on x86_64 and ia64.

Thanks
Robert Kidd
rkidd@crhc.uiuc.edu

2006-02-21 Robert Kidd <rkidd@crhc.uiuc.edu>

	* bb-reorder.c (rest_of_handler_reorder_blocks): Removed call to
	RTL level tracer pass.
	* passes.c (init_optimization_passes): Move pass_tracer from
	after pass_rtl_ifcvt to after pass_dce.
	* tracer.c: Update copyright.
	(layout_superblocks): Remove function.
	(mark_bb_seen): New.
	(bb_seen_p): New.
	(count_insns): Change to estimate instructions in a Tree-SSA
	statement.
	(find_trace): Use bb_seen_p.
	(tail_duplicate): Use bb_seen_p.  Call add_phi_args_after_copy
	after duplicate_block.
	(tracer): Change prototype to match that of a pass execute
	callback.
	(gate_tracer): Rename from gate_handle_tracer.
	(rest_of_handle_tracer): Remove function.
	* rtl.h: Remove prototype for tracer.
	* testsuite/gcc.dg/tree-prof/tracer-1.c: New.

Attachment: superblock-1.patch.txt
Description: Text document


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