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: Preserve label alignment info through dbr


On 07/10/2013 03:37 AM, Eric Botcazou wrote:
Hi,

I was a little surprised to find out that dbr can silently drop the alignment
information for labels computed when the CFG is valid (in compute_alignments).
The pessimization can be significant for loops when the top label needs to be
overaligned, as seen on a private port.  Hence the attached patch.

Tested on SPARC/Solaris and SPARC64/Solaris, any objections?


2013-07-10  Eric Botcazou  <ebotcazou@adacore.com>

	* rtl.h (update_alignments): Declare.
	* final.c (grow_label_align): New function extracted from...
	(shorten_branches): ...here.  Call it.
	(update_alignments): New function.
	* reorg.c (sibling_labels): New variable.
	(get_label_before): Add SIBLING parameter.  If it is non-zero, push
	the new label along with it onto the sibling_labels vector.
	(fill_simple_delay_slots): Adjust call to get_label_before.
	(fill_slots_from_thread): Likewise.
	(relax_delay_slots): Likewise.
	(make_return_insns): Likewise.
	(dbr_schedule): Invoke update_alignment on the sibling_labels vector.


Looks good to me.

jeff


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