Hi all,
This is the first of a series to clean up and simplify the arm rtx costs function.
This patch initialises the cost to COSTS_N_INSNS (1) at the top and increments it when appropriate
in the rest of the function. This makes it more similar to the aarch64 rtx costs function and saves
us the trouble of having to remember to initialise the cost to COSTS_N_INSNS (1) in each case of the
switch statement.
Bootstrapped and tested arm-none-linux-gnueabihf.
Compiled some large programs with no codegen difference, except some DIV synthesis algorithms were changed,
presumably due to the cost of SDIV/UDIV, which is now being correctly calculated (before it was missing the
baseline COSTS_N_INSNS (1)).
Ok for trunk?
Thanks,
Kyrill
2015-04-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.c (arm_new_rtx_costs): Initialise cost to
COSTS_N_INSNS (1) and increment it appropriately throughout the
function.