[5/9] Make more use of regs_invalidated_by_call
diff mbox series

Message ID mptsgp42juy.fsf@arm.com
State New
Headers show
Series
  • Reduce the amount of global ABI state
Related show

Commit Message

Richard Sandiford Sept. 10, 2019, 4:31 p.m. UTC
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.

Comments

Jeff Law Sept. 10, 2019, 6:33 p.m. UTC | #1
On 9/10/19 10:31 AM, Richard Sandiford wrote:
> 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.
Funny, I saw that in the sh bits and nearly asked if it could be
simplified :-)

OK
jeff

Patch
diff mbox series

Index: gcc/config/frv/frv.c
===================================================================
--- gcc/config/frv/frv.c	2019-09-10 17:22:44.690419243 +0100
+++ gcc/config/frv/frv.c	2019-09-10 17:22:48.550392392 +0100
@@ -5201,7 +5201,7 @@  frv_ifcvt_modify_tests (ce_if_block *ce_
      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: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	2019-09-10 17:22:44.694419214 +0100
+++ gcc/config/sh/sh.c	2019-09-10 17:22:48.554392364 +0100
@@ -6707,7 +6707,7 @@  output_stack_adjust (int size, rtx reg,
 	    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)