Hi Alan,

On Wed, May 08, 2019 at 03:02:48PM +0930, Alan Modra wrote:
> This is https://gcc.gnu.org/ml/gcc-patches/2019-03/msg01299.html with
> the fixes Segher requested, plus a few more:
> - delete PREFERRED_RELOAD_CLASS changes
> - adjust for recent register renumbering
> - use defines rather than hard coding register numbers

Did you need to adjust for the renumbering _at all_ after that?
(edit: Ah, the reg sets).

> - flip altivec/float test when dealing with moves within vsx regs,
>   so that the altivec hard reg count is preferred over the fp hard reg
>   count when both reg types are possible.
> - use 2 for power9 direct move cost, and remove more '?'s from insns.
> - use reg_class_subset_p in the test for slow LR/CTR moves

Super minor:

> +       if (TARGET_DIRECT_MOVE)
> +         {
> +           if (rs6000_tune != PROCESSOR_POWER9)
> +             ret = 4 * hard_regno_nregs (FIRST_GPR_REGNO, mode);
> +           else
> +             ret = 2 * hard_regno_nregs (FIRST_GPR_REGNO, mode);

Please write that the other way around, positive conditions are easier
to read?  And newer stuff first is nice, too.


Thanks for the patch!  Please apply to trunk.  And watch for fallout...
It is kind of inevitable I'm afraid.  But it's stage 1 now.


Segher

Reply via email to