Commit 48c0758a by Richard Earnshaw Committed by Richard Earnshaw

[ARM] Fix PR79742 incorrect scheduler choice.

Due to an oversight, the changes to use the new CPU generation tables
forgot to handle selecting a scheduler for a CPU other than the named
CPU target.  This meant that if, say, cortex-a12 was used, the null
scheduler was chosen rather than cortex-a17's scheduler as intended.
The fix is to correctly use the 'tune for' field when generating the
target-specific data files.

This revealed a spelling mistake in the name of the tune target in
cortex-m0.small-multiply.

	PR target/79742
	* config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
	entry, if present.
	* config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
	'tune for' CPU name.
	* config/arm/arm-cpu-data.h: Regenerated.

From-SVN: r245775
parent b54f986e
2017-02-28 Richard Earnshaw <rearnsha@arm.com>
PR target/79742
* config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
entry, if present.
* config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
'tune for' CPU name.
* config/arm/arm-cpu-data.h: Regenerated.
2017-02-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/79732
......
......@@ -814,7 +814,7 @@ end cpu cortex-m0.small-multiply
begin cpu cortex-m0plus.small-multiply
cname cortexm0plussmallmultiply
tune for cortexm0-plus
tune for cortex-m0plus
tune flags LDSCHED SMALLMUL
architecture armv6-m
costs v6m
......
......@@ -124,7 +124,16 @@ function gen_data () {
for (n = 1; n <= ncpus; n++) {
print " {"
print " \"" cpus[n] "\", TARGET_CPU_" cpu_cnames[cpus[n]] ","
print " \"" cpus[n] "\","
if (cpus[n] in cpu_tune_for) {
if (! (cpu_tune_for[cpus[n]] in cpu_cnames)) {
fatal("unknown \"tune for\" target " cpu_tune_for[cpus[n]] \
" for CPU " cpus[n])
}
print " TARGET_CPU_" cpu_cnames[cpu_tune_for[cpus[n]]] ","
} else {
print " TARGET_CPU_" cpu_cnames[cpus[n]] ","
}
if (cpus[n] in cpu_tune_flags) {
print " (" cpu_tune_flags[cpus[n]] "),"
} else print " 0,"
......@@ -156,7 +165,7 @@ function gen_data () {
print " {"
if (! (arch_tune_for[archs[n]] in cpu_cnames)) {
fatal("unknown \"tune for\" target " arch_tune_for[archs[n]] \
"for architecture " archs[n])
" for architecture " archs[n])
}
print " \"" archs[n] \
"\", TARGET_CPU_" cpu_cnames[arch_tune_for[archs[n]]] ","
......
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