Hi, With all the work that has recently gone in to ifcvt, I thought I'd revisit the branch cost settings for Cortex-A57. After a run of experiments [1], I found {1, 3} to be the sweet spot, giving a small set of performance improvements across some popular benchmarks.
I'd therefore like to propose changing the branch cost to those numbers. Patch bootstrapped tuning for Cortex-A57 with no issues. I'll revisit the same for Cortex-A53. OK? Thanks, James [1]: {2, 2}, {2, 3}, {2, 4}, {1, 2}, {1, 3}, {1, 4}, {3, 3}, {3, 4}, {4, 4}, {4, 5}, {5, 5}, {5, 6} --- 2015-11-12 James Greenhalgh <james.greenha...@arm.com> * config/aarch64/aarch64.c (cortexa57_branch_costs): New. (cortexa57_tunings): Use it.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 5ec7f08..96df9ed 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -338,6 +338,13 @@ static const struct cpu_branch_cost generic_branch_cost = 2 /* Unpredictable. */ }; +/* Branch costs for Cortex-A57. */ +static const struct cpu_branch_cost cortexa57_branch_cost = +{ + 1, /* Predictable. */ + 3 /* Unpredictable. */ +}; + static const struct tune_params generic_tunings = { &cortexa57_extra_costs, @@ -393,7 +400,7 @@ static const struct tune_params cortexa57_tunings = &cortexa57_addrcost_table, &cortexa57_regmove_cost, &cortexa57_vector_cost, - &generic_branch_cost, + &cortexa57_branch_cost, 4, /* memmov_cost */ 3, /* issue_rate */ (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD