[IRA] some code improvement and s390 support
Mon Sep 1 16:51:00 GMT 2014
Vladmir Makarov wrote:
> * config/s390/s390.h (IRA_COVER_CLASSES,
> IRA_HARD_REGNO_ADD_COST_MULTIPLIER(regno)): Define.
In debugging PR 53854 I noticed a strange behavior in IRA costs
that seems to trace back to the very first definition of the
IRA_HARD_REGNO_ADD_COST_MULTIPLIER on s390:
> +/* In some case register allocation order is not enough for IRA to
> + generate a good code. The following macro (if defined) increases
> + cost of REGNO for a pseudo approximately by pseudo usage frequency
> + multiplied by the macro value.
> + We avoid usage of BASE_REGNUM by nonzero macro value because the
> + reload can decide not to use the hard register because some
> + constant was forced to be in memory. */
> +#define IRA_HARD_REGNO_ADD_COST_MULTIPLIER(regno) \
> + (regno == BASE_REGNUM ? 0.0 : 0.5)
(which is still unchanged in current sources.)
Now, the comment says BASE_REGNUM should be avoided, but the actual
implementation of the macro seems to avoid *all* registers *but*
Am I misreading this, or is there indeed a logic error here?
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
More information about the Gcc-patches