[PATCH, ARM] Make branch cost a tunable parameter
Richard Earnshaw
rearnsha@arm.com
Wed Jun 1 15:57:00 GMT 2011
On Wed, 2011-06-01 at 16:24 +0100, Julian Brown wrote:
> This patch allows the BRANCH_COST macro to be altered for a given
> target using the ARM backend's tuning infrastructure. It's not easy
> to reduce the cost to e.g. a single integer or a set of integers (cores
> may have different branch costing characteristics for ARM vs. Thumb-2
> mode for instance, as in the existing BRANCH_COST definition), so I've
> used a function pointer in the tuning structure for maximum flexibility.
>
> This patch just uses the same hook for all existing cores (i.e. it
> should result in unchanged behaviour). Later patches can then override
> the default in specific cases.
>
> Testing is still in progress. OK to apply, pending success with that?
>
> Thanks,
>
> Julian
>
> ChangeLog
>
> gcc/
> * config/arm/arm-protos.h (tune_params): Add branch_cost hook.
> * config/arm/arm.c (arm_default_branch_cost): New.
> (arm_slowmul_tune, arm_fastmul_tune, arm_xscale_tune, arm_9e_tune)
> (arm_v6t2_tune, arm_cortex_tune, arm_cortex_a9_tune)
> (arm_fa726_tune): Set branch_cost field using
> arm_default_branch_cost.
> * config/arm/arm.h (BRANCH_COST): Use branch_cost hook from
> current_tune structure.
> * dojump.c (tm_p.h): Include file.
OK.
R.
More information about the Gcc-patches
mailing list