Make more use of regs_invalidated_by_call
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 10 Sep 2019 18:56:43 +0000 (18:56 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 10 Sep 2019 18:56:43 +0000 (18:56 +0000)
This cleans up a couple of places in which the previous patch had:

  call_used_or_fixed_regs & ~fixed_reg_set

In that context, regs_invalidated_by_call is IMO more obvious.

2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/frv/frv.c (frv_ifcvt_modify_tests): Use
regs_invalidated_by_call & ~fixed_reg_set instead of
call_used_or_fixed_regs & ~fixed_reg_set.
* config/sh/sh.c (output_stack_adjust): Likewise.

From-SVN: r275601

gcc/ChangeLog
gcc/config/frv/frv.c
gcc/config/sh/sh.c

index 403e8ddbd3af5c84ef3bcb13355bed12104ac59d..33f34c3934b6b78d4f030e1c23c18be5ec4d6c27 100644 (file)
@@ -1,3 +1,10 @@
+2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * config/frv/frv.c (frv_ifcvt_modify_tests): Use
+       regs_invalidated_by_call & ~fixed_reg_set instead of
+       call_used_or_fixed_regs & ~fixed_reg_set.
+       * config/sh/sh.c (output_stack_adjust): Likewise.
+
 2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
 
        * hard-reg-set.h (target_hard_regs::x_call_used_reg_set): Delete.
index 90c062bed191a202ca43ec379ad7ba7f55ad6b6e..936c532f4d743ed4d42d984ab1921cc550781e09 100644 (file)
@@ -5201,7 +5201,7 @@ frv_ifcvt_modify_tests (ce_if_block *ce_info, rtx *p_true, rtx *p_false)
      not fixed.  However, allow the ICC/ICR temporary registers to be allocated
      if we did not need to use them in reloading other registers.  */
   memset (&tmp_reg->regs, 0, sizeof (tmp_reg->regs));
-  tmp_reg->regs = call_used_or_fixed_regs &~ fixed_reg_set;
+  tmp_reg->regs = regs_invalidated_by_call & ~fixed_reg_set;
   SET_HARD_REG_BIT (tmp_reg->regs, ICC_TEMP);
   SET_HARD_REG_BIT (tmp_reg->regs, ICR_TEMP);
 
index fd23fb03c724fc77748f4cdcfda765ff7e7920bd..ab3a78fafdc4f752fb0c23a53f87060a95330d1c 100644 (file)
@@ -6707,7 +6707,7 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
            temp = -1;
          if (temp < 0 && ! current_function_interrupt && epilogue_p >= 0)
            {
-             HARD_REG_SET temps = (call_used_or_fixed_regs
+             HARD_REG_SET temps = (regs_invalidated_by_call
                                    & ~fixed_reg_set
                                    & savable_regs);
              if (epilogue_p > 0)