diff options
author | Hale Wang <hale.wang@arm.com> | 2015-01-14 11:15:30 +0000 |
---|---|---|
committer | Hale Wang <halewang@gcc.gnu.org> | 2015-01-14 11:15:30 +0000 |
commit | 6af2585d5c9880f8a3925e2f3fb4b0713b0647db (patch) | |
tree | 8e9ec972b692865564da731c343aa6ac55474e3a | |
parent | 683750ce0915e3703cf50d21c3150ed947b57617 (diff) | |
download | gcc-6af2585d5c9880f8a3925e2f3fb4b0713b0647db.zip gcc-6af2585d5c9880f8a3925e2f3fb4b0713b0647db.tar.gz gcc-6af2585d5c9880f8a3925e2f3fb4b0713b0647db.tar.bz2 |
arm.c: Tune the max_cond_insns/branch_cost for Cortex-M7.
2015-01-14 Hale Wang <hale.wang@arm.com>
* config/arm/arm.c: Tune the max_cond_insns/branch_cost for
Cortex-M7.
From-SVN: r219589
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c852337..96ef507 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-01-14 Hale Wang <hale.wang@arm.com> + + * config/arm/arm.c: Tune the max_cond_insns/branch_cost for + Cortex-M7. + 2015-01-14 Richard Biener <rguenther@suse.de> PR lto/64415 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1a92753..1a19011 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -294,6 +294,7 @@ static unsigned int arm_autovectorize_vector_sizes (void); static int arm_default_branch_cost (bool, bool); static int arm_cortex_a5_branch_cost (bool, bool); static int arm_cortex_m_branch_cost (bool, bool); +static int arm_cortex_m7_branch_cost (bool, bool); static bool arm_vectorize_vec_perm_const_ok (machine_mode vmode, const unsigned char *sel); @@ -2001,10 +2002,10 @@ const struct tune_params arm_cortex_m7_tune = &v7m_extra_costs, NULL, /* Sched adj cost. */ 0, /* Constant limit. */ - 0, /* Max cond insns. */ + 1, /* Max cond insns. */ ARM_PREFETCH_NOT_BENEFICIAL, true, /* Prefer constant pool. */ - arm_cortex_m_branch_cost, + arm_cortex_m7_branch_cost, false, /* Prefer LDRD/STRD. */ {true, true}, /* Prefer non short circuit. */ &arm_default_vec_cost, /* Vectorizer costs. */ @@ -12052,6 +12053,12 @@ arm_cortex_m_branch_cost (bool speed_p, bool predictable_p) : arm_default_branch_cost (speed_p, predictable_p); } +static int +arm_cortex_m7_branch_cost (bool speed_p, bool predictable_p) +{ + return speed_p ? 0 : arm_default_branch_cost (speed_p, predictable_p); +} + static bool fp_consts_inited = false; static REAL_VALUE_TYPE value_fp0; |