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: [IRA] patch for save restore code placement optimization


On Fri, 2007-02-02 at 12:25 -0500, Vladimir N. Makarov wrote:
>   This patch is an initial version of save/restore code optimization.
> It aims to decrease number of save-restore insns around calls and
> increase gap between the corresponding save and restore code and as a
> result to give more chance to reload to find a hard register without
> spilling a pseudo-register.
> 
> 2007-02-31  Vladimir Makarov  <vmakarov@redhat.com>
> 
> 	* reload.h (debug_save_data): New definition.
> 	
> 	* caller-save.c (struct bb_info): New.
> 	(BB_INFO, BB_INFO_BY_INDEX): New macros.
> 	(calculate_local_save_info, set_up_bb_rts_numbers, rpost_cmp,
> 	calculate_save_in_out, calculate_save_here,
> 	make_global_save_analysis, print_hard_reg_set_and_mode,
> 	print_hard_reg_set, print_save_data, debug_save_data,
> 	set_hard_reg_saved): New functions.
> 	(save_call_clobbered_regs): Make global save analysis and use it
> 	to put save/restore code.
> 	(insert_one_insn): Check CODE_LABEL.
IIRC, sparc floating point performance was an excellent way to do
performance tests of the caller-save code.   I used to build the X
server then run x11perf, some of the benchmarks really hit the FP
unit hard.

The basic problem was (still is?) there were no call-saved FP registers
defined in the ABI and as a result the sparc depended on the caller-save
code more heavily than any other port that I could remember.

Enabling caller-save for the sparc FP registers was a huge win, then
combining single word loads/stores into double word loads and stores
was a smaller win.  I did some work to reduce the number of saves and
restores, but those changes weren't much of a win and I abandoned
the work.

Anyway, just thought I'd mention it if you're looking for ways to
benchmark the effects of this change.

Jeff


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