The AArch64 backend sets BRANCH_COST to be the constant value 2 for all cpus, meaning that the compiler thinks that branches cost the same across all cpus. This patch reworks the handling of branch costs to allow per-cpu values to be set. The actual value of the branch-costs is unchanged as the correct values for will need to be decided for each core. Tested aarch64-none-linux-gnu with gcc-check. Ok for trunk? Matthew 2015-05-21 Matthew Wahab * gcc/config/aarch64-protos.h (struct cpu_branch_cost): New. (tune_params): Add field branch_costs. (aarch64_branch_cost): Declare. * gcc/config/aarch64.c (generic_branch_cost): New. (generic_tunings): Set field cpu_branch_cost to generic_branch_cost. (cortexa53_tunings): Likewise. (cortexa57_tunings): Likewise. (thunderx_tunings): Likewise. (xgene1_tunings): Likewise. (aarch64_branch_cost): Define. * gcc/config/aarch64/aarch64.h (BRANCH_COST): Redefine.