This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Zen tuning part 2: Increase branch_cost to 3
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, Venkataramanan dot Kumar at amd dot com
- Date: Thu, 5 Oct 2017 17:11:15 +0200
- Subject: Zen tuning part 2: Increase branch_cost to 3
- Authentication-results: sourceware.org; auth=none
Hi,
this patch increases branch_cost to 3. Constant 2 is apparently copied from
bdver4 costs while core and generic use 3. 3 seems to give best results for
spec2000 and also significantly improve monte carlo benchmark from scimark.
Bootstrapped/regtested x86_64-linux, comitted.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 253448)
+++ config/i386/i386.c (working copy)
@@ -1421,7 +1421,7 @@ struct processor_costs znver1_cost = {
to limit number of prefetches at all, as their execution also takes some
time). */
100, /* number of parallel prefetches. */
- 2, /* Branch cost. */
+ 3, /* Branch cost. */
COSTS_N_INSNS (6), /* cost of FADD and FSUB insns. */
COSTS_N_INSNS (6), /* cost of FMUL instruction. */
COSTS_N_INSNS (42), /* cost of FDIV instruction. */