Commit bacf8ec3 by Dominik Vogt Committed by Andreas Krebbel

[PATCH 4/4] S390 -march=native related fixes

gcc/ChangeLog

	* config/s390/s390.c (s390_reorg): Clean up handling of processors with
	-mtune=
	(s390_issue_rate): Likewise.
	(s390_sched_reorder): Likewise.
	(s390_sched_variable_issue): Likewise.
	(s390_loop_unroll_adjust): Likewise.
	(s390_option_override):  Likewise.

From-SVN: r226147
parent b1b5aa2f
2015-07-24 Dominik Vogt <vogt@linux.vnet.ibm.com> 2015-07-24 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.c (s390_reorg): Clean up handling of processors
with
-mtune=
(s390_issue_rate): Likewise.
(s390_sched_reorder): Likewise.
(s390_sched_variable_issue): Likewise.
(s390_loop_unroll_adjust): Likewise.
(s390_option_override): Likewise.
2015-07-24 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/driver-native.c (s390_host_detect_local_cpu): Handle * config/s390/driver-native.c (s390_host_detect_local_cpu): Handle
processor capabilities with -march=native. processor capabilities with -march=native.
* config/s390/s390.h (MARCH_MTUNE_NATIVE_SPECS): Likewise. * config/s390/s390.h (MARCH_MTUNE_NATIVE_SPECS): Likewise.
......
...@@ -7304,11 +7304,15 @@ s390_issue_rate (void) ...@@ -7304,11 +7304,15 @@ s390_issue_rate (void)
return 3; return 3;
case PROCESSOR_2097_Z10: case PROCESSOR_2097_Z10:
return 2; return 2;
case PROCESSOR_9672_G5:
case PROCESSOR_9672_G6:
case PROCESSOR_2064_Z900:
/* Starting with EC12 we use the sched_reorder hook to take care /* Starting with EC12 we use the sched_reorder hook to take care
of instruction dispatch constraints. The algorithm only of instruction dispatch constraints. The algorithm only
picks the best instruction and assumes only a single picks the best instruction and assumes only a single
instruction gets issued per cycle. */ instruction gets issued per cycle. */
case PROCESSOR_2827_ZEC12: case PROCESSOR_2827_ZEC12:
case PROCESSOR_2964_Z13:
default: default:
return 1; return 1;
} }
...@@ -12914,10 +12918,7 @@ s390_reorg (void) ...@@ -12914,10 +12918,7 @@ s390_reorg (void)
s390_optimize_prologue (); s390_optimize_prologue ();
/* Walk over the insns and do some >=z10 specific changes. */ /* Walk over the insns and do some >=z10 specific changes. */
if (s390_tune == PROCESSOR_2097_Z10 if (s390_tune >= PROCESSOR_2097_Z10)
|| s390_tune == PROCESSOR_2817_Z196
|| s390_tune == PROCESSOR_2827_ZEC12
|| s390_tune == PROCESSOR_2964_Z13)
{ {
rtx_insn *insn; rtx_insn *insn;
bool insn_added_p = false; bool insn_added_p = false;
...@@ -13168,12 +13169,12 @@ static int ...@@ -13168,12 +13169,12 @@ static int
s390_sched_reorder (FILE *file, int verbose, s390_sched_reorder (FILE *file, int verbose,
rtx_insn **ready, int *nreadyp, int clock ATTRIBUTE_UNUSED) rtx_insn **ready, int *nreadyp, int clock ATTRIBUTE_UNUSED)
{ {
if (s390_tune == PROCESSOR_2097_Z10) if (s390_tune == PROCESSOR_2097_Z10
if (reload_completed && *nreadyp > 1) && reload_completed
s390_z10_prevent_earlyload_conflicts (ready, nreadyp); && *nreadyp > 1)
s390_z10_prevent_earlyload_conflicts (ready, nreadyp);
if ((s390_tune == PROCESSOR_2827_ZEC12 if (s390_tune >= PROCESSOR_2827_ZEC12
|| s390_tune == PROCESSOR_2964_Z13)
&& reload_completed && reload_completed
&& *nreadyp > 1) && *nreadyp > 1)
{ {
...@@ -13256,8 +13257,7 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) ...@@ -13256,8 +13257,7 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more)
{ {
last_scheduled_insn = insn; last_scheduled_insn = insn;
if ((s390_tune == PROCESSOR_2827_ZEC12 if (s390_tune >= PROCESSOR_2827_ZEC12
|| s390_tune == PROCESSOR_2964_Z13)
&& reload_completed && reload_completed
&& recog_memoized (insn) >= 0) && recog_memoized (insn) >= 0)
{ {
...@@ -13335,10 +13335,7 @@ s390_loop_unroll_adjust (unsigned nunroll, struct loop *loop) ...@@ -13335,10 +13335,7 @@ s390_loop_unroll_adjust (unsigned nunroll, struct loop *loop)
unsigned i; unsigned i;
unsigned mem_count = 0; unsigned mem_count = 0;
if (s390_tune != PROCESSOR_2097_Z10 if (s390_tune < PROCESSOR_2097_Z10)
&& s390_tune != PROCESSOR_2817_Z196
&& s390_tune != PROCESSOR_2827_ZEC12
&& s390_tune != PROCESSOR_2964_Z13)
return nunroll; return nunroll;
/* Count the number of memory references within the loop body. */ /* Count the number of memory references within the loop body. */
...@@ -13553,10 +13550,7 @@ s390_option_override (void) ...@@ -13553,10 +13550,7 @@ s390_option_override (void)
target_flags |= MASK_LONG_DOUBLE_128; target_flags |= MASK_LONG_DOUBLE_128;
#endif #endif
if (s390_tune == PROCESSOR_2097_Z10 if (s390_tune >= PROCESSOR_2097_Z10)
|| s390_tune == PROCESSOR_2817_Z196
|| s390_tune == PROCESSOR_2827_ZEC12
|| s390_tune == PROCESSOR_2964_Z13)
{ {
maybe_set_param_value (PARAM_MAX_UNROLLED_INSNS, 100, maybe_set_param_value (PARAM_MAX_UNROLLED_INSNS, 100,
global_options.x_param_values, global_options.x_param_values,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment