Message ID | 20171005151115.GB73318@kam.mff.cuni.cz |
---|---|
State | New |
Headers | show |
Series | Zen tuning part 2: Increase branch_cost to 3 | expand |
Should mention PR target/80313 (don't know if this is a complete fix, but it's at least an issue mentioned in that bug).
Hi Honza,
-----Original Message-----
From: Jan Hubicka [mailto:hubicka@ucw.cz]
Sent: Thursday, October 5, 2017 8:41 PM
To: gcc-patches@gcc.gnu.org; Kumar, Venkataramanan <Venkataramanan.Kumar@amd.com>
Subject: Zen tuning part 2: Increase branch_cost to 3
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. */
Sure looks good to me.
Regards,
Venkat.
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. */