S/390: Don't fetch the return address early with ooo

We used to load the return address slot some time in advance.  This
helped on older machines to resolve the data dependencies in time.
However, it is pointless on out of order CPUs.  Disabled with that
patch.

gcc/ChangeLog:

2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_emit_epilogue): Disable early return
	address fetch for z10 or later.

From-SVN: r248789
This commit is contained in:
Andreas Krebbel 2017-06-01 11:30:36 +00:00 committed by Andreas Krebbel
parent e257141f07
commit 4ba66aee9e
2 changed files with 35 additions and 29 deletions

View File

@ -1,3 +1,8 @@
2017-06-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_emit_epilogue): Disable early return
address fetch for z10 or later.
2017-06-01 Claudiu Zissulescu <claziss@synopsys.com> 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (tst_movb): Add guard when splitting. * config/arc/arc.md (tst_movb): Add guard when splitting.

View File

@ -11410,8 +11410,6 @@ s390_emit_epilogue (bool sibcall)
gen_rtx_REG (Pmode, i), cfa_restores); gen_rtx_REG (Pmode, i), cfa_restores);
} }
if (! sibcall)
{
/* Fetch return address from stack before load multiple, /* Fetch return address from stack before load multiple,
this will do good for scheduling. this will do good for scheduling.
@ -11419,8 +11417,12 @@ s390_emit_epilogue (bool sibcall)
saved to a stack slot. (And not just because r14 happens to saved to a stack slot. (And not just because r14 happens to
be in between two GPRs which need saving.) Otherwise it be in between two GPRs which need saving.) Otherwise it
would be difficult to take that decision back in would be difficult to take that decision back in
s390_optimize_prologue. */ s390_optimize_prologue.
if (cfun_gpr_save_slot (RETURN_REGNUM) == SAVE_SLOT_STACK)
This optimization is only helpful on in-order machines. */
if (! sibcall
&& cfun_gpr_save_slot (RETURN_REGNUM) == SAVE_SLOT_STACK
&& s390_tune <= PROCESSOR_2097_Z10)
{ {
int return_regnum = find_unused_clobbered_reg(); int return_regnum = find_unused_clobbered_reg();
if (!return_regnum) if (!return_regnum)
@ -11437,12 +11439,11 @@ s390_emit_epilogue (bool sibcall)
emit_move_insn (return_reg, addr); emit_move_insn (return_reg, addr);
/* Once we did that optimization we have to make sure /* Once we did that optimization we have to make sure
s390_optimize_prologue does not try to remove the s390_optimize_prologue does not try to remove the store
store of r14 since we will not be able to find the of r14 since we will not be able to find the load issued
load issued here. */ here. */
cfun_frame_layout.save_return_addr_p = true; cfun_frame_layout.save_return_addr_p = true;
} }
}
insn = restore_gprs (frame_pointer, insn = restore_gprs (frame_pointer,
offset + cfun_frame_layout.gprs_offset offset + cfun_frame_layout.gprs_offset