Index: gcc/hard-reg-set.h
===================================================================
--- gcc/hard-reg-set.h	2019-09-10 17:22:44.694419214 +0100
+++ gcc/hard-reg-set.h	2019-09-10 17:22:54.094353828 +0100
@@ -511,4 +511,13 @@ #define reg_names \
 #define REG_CAN_CHANGE_MODE_P(REGN, FROM, TO)                          \
   (targetm.can_change_mode_class (FROM, TO, REGNO_REG_CLASS (REGN)))
 
+/* Return true if register REGNO is either fixed or call-used
+   (aka call-clobbered).  */
+
+inline bool
+call_used_or_fixed_reg_p (unsigned int regno)
+{
+  return fixed_regs[regno] || call_used_regs[regno];
+}
+
 #endif /* ! GCC_HARD_REG_SET_H */
Index: gcc/cfgloopanal.c
===================================================================
--- gcc/cfgloopanal.c	2019-07-10 19:41:21.627936214 +0100
+++ gcc/cfgloopanal.c	2019-09-10 17:22:54.010354412 +0100
@@ -353,7 +353,7 @@ init_set_costs (void)
 	&& !fixed_regs[i])
       {
 	target_avail_regs++;
-	if (call_used_regs[i])
+	if (call_used_or_fixed_reg_p (i))
 	  target_clobbered_regs++;
       }
 
Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c	2019-09-09 17:02:47.000000000 +0100
+++ gcc/config/aarch64/aarch64.c	2019-09-10 17:22:54.014354384 +0100
@@ -5336,12 +5336,12 @@ #define SLOT_REQUIRED     (-1)
   for (regno = R0_REGNUM; regno <= R30_REGNUM; regno++)
     if (df_regs_ever_live_p (regno)
 	&& (regno == R30_REGNUM
-	    || !call_used_regs[regno]))
+	    || !call_used_or_fixed_reg_p (regno)))
       cfun->machine->frame.reg_offset[regno] = SLOT_REQUIRED;
 
   for (regno = V0_REGNUM; regno <= V31_REGNUM; regno++)
     if (df_regs_ever_live_p (regno)
-	&& (!call_used_regs[regno]
+	&& (!call_used_or_fixed_reg_p (regno)
 	    || (simd_function && FP_SIMD_SAVED_REGNUM_P (regno))))
       {
 	cfun->machine->frame.reg_offset[regno] = SLOT_REQUIRED;
@@ -5938,7 +5938,7 @@ aarch64_components_for_bb (basic_block b
 
   /* GPRs are used in a bb if they are in the IN, GEN, or KILL sets.  */
   for (unsigned regno = 0; regno <= LAST_SAVED_REGNUM; regno++)
-    if ((!call_used_regs[regno]
+    if ((!call_used_or_fixed_reg_p (regno)
 	|| (simd_function && FP_SIMD_SAVED_REGNUM_P (regno)))
        && (bitmap_bit_p (in, regno)
 	   || bitmap_bit_p (gen, regno)
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	2019-08-20 09:53:27.526264110 +0100
+++ gcc/config/alpha/alpha.c	2019-09-10 17:22:54.018354355 +0100
@@ -7225,7 +7225,7 @@ alpha_compute_frame_layout (void)
 
       /* One for every register we have to save.  */
       for (unsigned i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-	if (! fixed_regs[i] && ! call_used_regs[i]
+	if (! fixed_regs[i] && ! call_used_or_fixed_reg_p (i)
 	    && df_regs_ever_live_p (i) && i != REG_RA)
 	  sa_mask |= HOST_WIDE_INT_1U << i;
 
@@ -7285,7 +7285,7 @@ alpha_compute_frame_layout (void)
       vms_save_fp_regno = -1;
       if (vms_base_regno == HARD_FRAME_POINTER_REGNUM)
 	for (unsigned i = 0; i < 32; i++)
-	  if (! fixed_regs[i] && call_used_regs[i]
+	  if (! fixed_regs[i] && call_used_or_fixed_reg_p (i)
 	      && ! df_regs_ever_live_p (i))
 	    {
 	      vms_save_fp_regno = i;
Index: gcc/config/arc/arc.c
===================================================================
--- gcc/config/arc/arc.c	2019-08-20 09:53:06.614416290 +0100
+++ gcc/config/arc/arc.c	2019-09-10 17:22:54.018354355 +0100
@@ -2735,7 +2735,7 @@ arc_must_save_register (int regno, struc
       break;
     }
 
-  if (((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+  if (((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
        /* In an interrupt save everything.  */
        || (ARC_INTERRUPT_P (fn_type)
 	   && (df_regs_ever_live_p (RETURN_ADDR_REGNUM)
@@ -10331,7 +10331,7 @@ arc_epilogue_uses (int regno)
   if (epilogue_completed && ARC_INTERRUPT_P (fn_type))
     {
       /* An interrupt function restores more registers.  */
-      if (df_regs_ever_live_p (regno) || call_used_regs[regno])
+      if (df_regs_ever_live_p (regno) || call_used_or_fixed_reg_p (regno))
 	return true;
     }
 
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	2019-09-10 17:18:37.596138282 +0100
+++ gcc/config/arm/arm.c	2019-09-10 17:22:54.026354301 +0100
@@ -3475,7 +3475,7 @@ arm_option_override (void)
 	warning (0, "%<-mpic-register=%> is useless without %<-fpic%>");
 
       /* Prevent the user from choosing an obviously stupid PIC register.  */
-      else if (pic_register < 0 || call_used_regs[pic_register]
+      else if (pic_register < 0 || call_used_or_fixed_reg_p (pic_register)
 	       || pic_register == HARD_FRAME_POINTER_REGNUM
 	       || pic_register == STACK_POINTER_REGNUM
 	       || pic_register >= PC_REGNUM
@@ -4155,7 +4155,7 @@ use_return_insn (int iscond, rtx sibling
     {
       /* Validate that r3 is a call-clobbered register (always true in
 	 the default abi) ...  */
-      if (!call_used_regs[3])
+      if (!call_used_or_fixed_reg_p (3))
 	return 0;
 
       /* ... that it isn't being used for a return value ... */
@@ -4211,12 +4211,12 @@ use_return_insn (int iscond, rtx sibling
      since this also requires an insn.  */
   if (TARGET_HARD_FLOAT)
     for (regno = FIRST_VFP_REGNUM; regno <= LAST_VFP_REGNUM; regno++)
-      if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+      if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	return 0;
 
   if (TARGET_REALLY_IWMMXT)
     for (regno = FIRST_IWMMXT_REGNUM; regno <= LAST_IWMMXT_REGNUM; regno++)
-      if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+      if (df_regs_ever_live_p (regno) && ! call_used_or_fixed_reg_p (regno))
 	return 0;
 
   return 1;
@@ -7735,7 +7735,7 @@ legitimize_pic_address (rtx orig, machin
    registers are marked as caller saved when optimizing for size on Thumb-1
    targets despite being callee saved in order to avoid using them.  */
 #define callee_saved_reg_p(reg) \
-  (!call_used_regs[reg] \
+  (!call_used_or_fixed_reg_p (reg) \
    || (TARGET_THUMB1 && optimize_size \
        && reg >= FIRST_HI_REGNUM && reg <= LAST_HI_REGNUM))
 
@@ -19721,7 +19721,7 @@ arm_compute_save_reg0_reg12_mask (void)
 
       for (reg = 0; reg <= max_reg; reg++)
 	if (df_regs_ever_live_p (reg)
-	    || (! crtl->is_leaf && call_used_regs[reg]))
+	    || (! crtl->is_leaf && call_used_or_fixed_reg_p (reg)))
 	  save_reg_mask |= (1 << reg);
 
       /* Also save the pic base register if necessary.  */
@@ -19900,7 +19900,7 @@ arm_compute_save_core_reg_mask (void)
       && (save_reg_mask & THUMB2_WORK_REGS) == 0)
     {
       reg = thumb_find_work_register (1 << 4);
-      if (!call_used_regs[reg])
+      if (!call_used_or_fixed_reg_p (reg))
 	save_reg_mask |= (1 << reg);
     }
 
@@ -20008,8 +20008,10 @@ arm_get_vfp_saved_size (void)
 	   regno < LAST_VFP_REGNUM;
 	   regno += 2)
 	{
-	  if ((!df_regs_ever_live_p (regno) || call_used_regs[regno])
-	      && (!df_regs_ever_live_p (regno + 1) || call_used_regs[regno + 1]))
+	  if ((!df_regs_ever_live_p (regno)
+	       || call_used_or_fixed_reg_p (regno))
+	      && (!df_regs_ever_live_p (regno + 1)
+		  || call_used_or_fixed_reg_p (regno + 1)))
 	    {
 	      if (count > 0)
 		{
@@ -21530,7 +21532,8 @@ arm_compute_frame_layout (void)
 	  for (regno = FIRST_IWMMXT_REGNUM;
 	       regno <= LAST_IWMMXT_REGNUM;
 	       regno++)
-	    if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+	    if (df_regs_ever_live_p (regno)
+		&& !call_used_or_fixed_reg_p (regno))
 	      saved += 8;
 	}
 
@@ -21747,7 +21750,7 @@ arm_save_coproc_regs(void)
   rtx insn;
 
   for (reg = LAST_IWMMXT_REGNUM; reg >= FIRST_IWMMXT_REGNUM; reg--)
-    if (df_regs_ever_live_p (reg) && ! call_used_regs[reg])
+    if (df_regs_ever_live_p (reg) && !call_used_or_fixed_reg_p (reg))
       {
 	insn = gen_rtx_PRE_DEC (Pmode, stack_pointer_rtx);
 	insn = gen_rtx_MEM (V2SImode, insn);
@@ -21762,8 +21765,9 @@ arm_save_coproc_regs(void)
 
       for (reg = FIRST_VFP_REGNUM; reg < LAST_VFP_REGNUM; reg += 2)
 	{
-	  if ((!df_regs_ever_live_p (reg) || call_used_regs[reg])
-	      && (!df_regs_ever_live_p (reg + 1) || call_used_regs[reg + 1]))
+	  if ((!df_regs_ever_live_p (reg) || call_used_or_fixed_reg_p (reg))
+	      && (!df_regs_ever_live_p (reg + 1)
+		  || call_used_or_fixed_reg_p (reg + 1)))
 	    {
 	      if (start_reg != reg)
 		saved_size += vfp_emit_fstmd (start_reg,
@@ -25137,7 +25141,7 @@ thumb1_extra_regs_pushed (arm_stack_offs
     }
 
   while (reg_base + n_free < 8 && !(live_regs_mask & 1)
-	 && (for_prologue || call_used_regs[reg_base + n_free]))
+	 && (for_prologue || call_used_or_fixed_reg_p (reg_base + n_free)))
     {
       live_regs_mask >>= 1;
       n_free++;
@@ -25821,7 +25825,7 @@ cmse_nonsecure_entry_clear_before_return
 	continue;
       if (IN_RANGE (regno, IP_REGNUM, PC_REGNUM))
 	continue;
-      if (call_used_regs[regno])
+      if (call_used_or_fixed_reg_p (regno))
 	bitmap_set_bit (to_clear_bitmap, regno);
     }
 
@@ -25973,7 +25977,7 @@ thumb1_expand_epilogue (void)
   /* Emit a clobber for each insn that will be restored in the epilogue,
      so that flow2 will get register lifetimes correct.  */
   for (regno = 0; regno < 13; regno++)
-    if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
       emit_clobber (gen_rtx_REG (SImode, regno));
 
   if (! df_regs_ever_live_p (LR_REGNUM))
@@ -26039,9 +26043,9 @@ arm_expand_epilogue_apcs_frame (bool rea
 
       for (i = FIRST_VFP_REGNUM; i < LAST_VFP_REGNUM; i += 2)
         /* Look for a case where a reg does not need restoring.  */
-        if ((!df_regs_ever_live_p (i) || call_used_regs[i])
+        if ((!df_regs_ever_live_p (i) || call_used_or_fixed_reg_p (i))
             && (!df_regs_ever_live_p (i + 1)
-                || call_used_regs[i + 1]))
+                || call_used_or_fixed_reg_p (i + 1)))
           {
             if (start_reg != i)
               arm_emit_vfp_multi_reg_pop (start_reg,
@@ -26068,7 +26072,7 @@ arm_expand_epilogue_apcs_frame (bool rea
       int lrm_count = (num_regs % 2) ? (num_regs + 2) : (num_regs + 1);
 
       for (i = LAST_IWMMXT_REGNUM; i >= FIRST_IWMMXT_REGNUM; i--)
-        if (df_regs_ever_live_p (i) && !call_used_regs[i])
+        if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
           {
             rtx addr = gen_frame_mem (V2SImode,
                                  plus_constant (Pmode, hard_frame_pointer_rtx,
@@ -26273,9 +26277,9 @@ arm_expand_epilogue (bool really_return)
          unlike pop, vldm can only do consecutive regs.  */
       for (i = LAST_VFP_REGNUM - 1; i >= FIRST_VFP_REGNUM; i -= 2)
         /* Look for a case where a reg does not need restoring.  */
-        if ((!df_regs_ever_live_p (i) || call_used_regs[i])
+        if ((!df_regs_ever_live_p (i) || call_used_or_fixed_reg_p (i))
             && (!df_regs_ever_live_p (i + 1)
-                || call_used_regs[i + 1]))
+                || call_used_or_fixed_reg_p (i + 1)))
           {
             /* Restore the regs discovered so far (from reg+2 to
                end_reg).  */
@@ -26297,7 +26301,7 @@ arm_expand_epilogue (bool really_return)
 
   if (TARGET_IWMMXT)
     for (i = FIRST_IWMMXT_REGNUM; i <= LAST_IWMMXT_REGNUM; i++)
-      if (df_regs_ever_live_p (i) && !call_used_regs[i])
+      if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
         {
           rtx_insn *insn;
           rtx addr = gen_rtx_MEM (V2SImode,
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	2019-08-20 09:53:06.622416231 +0100
+++ gcc/config/avr/avr.c	2019-09-10 17:22:54.026354301 +0100
@@ -1183,9 +1183,9 @@ avr_regs_to_save (HARD_REG_SET *set)
       if (fixed_regs[reg])
         continue;
 
-      if ((int_or_sig_p && !crtl->is_leaf && call_used_regs[reg])
+      if ((int_or_sig_p && !crtl->is_leaf && call_used_or_fixed_reg_p (reg))
           || (df_regs_ever_live_p (reg)
-              && (int_or_sig_p || !call_used_regs[reg])
+              && (int_or_sig_p || !call_used_or_fixed_reg_p (reg))
               /* Don't record frame pointer registers here.  They are treated
                  indivitually in prologue.  */
               && !(frame_pointer_needed
@@ -1367,7 +1367,7 @@ sequent_regs_live (void)
             continue;
         }
 
-      if (!call_used_regs[reg])
+      if (!call_used_or_fixed_reg_p (reg))
         {
           if (df_regs_ever_live_p (reg))
             {
@@ -3421,7 +3421,7 @@ avr_function_arg_advance (cumulative_arg
 
   if (cum->regno >= 8
       && cum->nregs >= 0
-      && !call_used_regs[cum->regno])
+      && !call_used_or_fixed_reg_p (cum->regno))
     {
       /* FIXME: We ship info on failing tail-call in struct machine_function.
          This uses internals of calls.c:expand_call() and the way args_so_far
@@ -3568,7 +3568,7 @@ avr_find_unused_d_reg (rtx_insn *insn, r
           && (TREE_THIS_VOLATILE (current_function_decl)
               || cfun->machine->is_OS_task
               || cfun->machine->is_OS_main
-              || (!isr_p && call_used_regs[regno])))
+              || (!isr_p && call_used_or_fixed_reg_p (regno))))
         {
           return reg;
         }
@@ -9552,7 +9552,7 @@ _reg_unused_after (rtx_insn *insn, rtx r
 		&& REG_P (XEXP (XEXP (tem, 0), 0))
 		&& reg_overlap_mentioned_p (reg, XEXP (XEXP (tem, 0), 0)))
 	      return 0;
-	  if (call_used_regs[REGNO (reg)])
+	  if (call_used_or_fixed_reg_p (REGNO (reg)))
 	    return 1;
 	}
 
Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	2019-09-09 18:58:51.448270881 +0100
+++ gcc/config/bfin/bfin.c	2019-09-10 17:22:54.026354301 +0100
@@ -235,13 +235,13 @@ must_save_p (bool is_inthandler, unsigne
       return (is_eh_return_reg
 	      || (df_regs_ever_live_p (regno)
 		  && !fixed_regs[regno]
-		  && (is_inthandler || !call_used_regs[regno])));
+		  && (is_inthandler || !call_used_or_fixed_reg_p (regno))));
     }
   else if (P_REGNO_P (regno))
     {
       return ((df_regs_ever_live_p (regno)
 	       && !fixed_regs[regno]
-	       && (is_inthandler || !call_used_regs[regno]))
+	       && (is_inthandler || !call_used_or_fixed_reg_p (regno)))
 	      || (is_inthandler
 		  && (ENABLE_WA_05000283 || ENABLE_WA_05000315)
 		  && regno == REG_P5)
@@ -251,9 +251,9 @@ must_save_p (bool is_inthandler, unsigne
 		      || (TARGET_ID_SHARED_LIBRARY && !crtl->is_leaf))));
     }
   else
-    return ((is_inthandler || !call_used_regs[regno])
+    return ((is_inthandler || !call_used_or_fixed_reg_p (regno))
 	    && (df_regs_ever_live_p (regno)
-		|| (!leaf_function_p () && call_used_regs[regno])));
+		|| (!leaf_function_p () && call_used_or_fixed_reg_p (regno))));
 
 }
 
@@ -419,7 +419,7 @@ expand_prologue_reg_save (rtx spreg, int
     if (saveall 
 	|| (is_inthandler
 	    && (df_regs_ever_live_p (i)
-		|| (!leaf_function_p () && call_used_regs[i]))))
+		|| (!leaf_function_p () && call_used_or_fixed_reg_p (i)))))
       {
 	rtx_insn *insn;
 	if (i == REG_A0 || i == REG_A1)
@@ -458,7 +458,7 @@ expand_epilogue_reg_restore (rtx spreg,
     if (saveall
 	|| (is_inthandler
 	    && (df_regs_ever_live_p (i)
-		|| (!leaf_function_p () && call_used_regs[i]))))
+		|| (!leaf_function_p () && call_used_or_fixed_reg_p (i)))))
       {
 	if (i == REG_A0 || i == REG_A1)
 	  {
@@ -652,7 +652,7 @@ n_regs_saved_by_prologue (void)
     if (all
 	|| (fkind != SUBROUTINE
 	    && (df_regs_ever_live_p (i)
-		|| (!leaf_function_p () && call_used_regs[i]))))
+		|| (!leaf_function_p () && call_used_or_fixed_reg_p (i)))))
       n += i == REG_A0 || i == REG_A1 ? 2 : 1;
 
   return n;
@@ -753,7 +753,7 @@ add_to_reg (rtx reg, HOST_WIDE_INT value
 	{
 	  int i;
 	  for (i = REG_P0; i <= REG_P5; i++)
-	    if ((df_regs_ever_live_p (i) && ! call_used_regs[i])
+	    if ((df_regs_ever_live_p (i) && ! call_used_or_fixed_reg_p (i))
 		|| (!TARGET_FDPIC
 		    && i == PIC_OFFSET_TABLE_REGNUM
 		    && (crtl->uses_pic_offset_table
@@ -3482,7 +3482,7 @@ hwloop_optimize (hwloop_info loop)
       for (i = REG_P0; i <= REG_P5; i++)
 	if ((df_regs_ever_live_p (i)
 	     || (funkind (TREE_TYPE (current_function_decl)) == SUBROUTINE
-		 && call_used_regs[i]))
+		 && call_used_or_fixed_reg_p (i)))
 	    && !REGNO_REG_SET_P (df_get_live_out (bb_in), i))
 	  {
 	    scratchreg = gen_rtx_REG (SImode, i);
Index: gcc/config/bpf/bpf.c
===================================================================
--- gcc/config/bpf/bpf.c	2019-09-09 12:19:41.557571047 +0100
+++ gcc/config/bpf/bpf.c	2019-09-10 17:22:54.026354301 +0100
@@ -273,7 +273,7 @@ bpf_compute_frame_layout (void)
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
     if ((!fixed_regs[regno]
 	 && df_regs_ever_live_p (regno)
-	 && !call_used_regs[regno])
+	 && !call_used_or_fixed_reg_p (regno))
 	|| (cfun->calls_alloca
 	    && regno == STACK_POINTER_REGNUM))
       cfun->machine->callee_saved_reg_size += 8;
@@ -314,7 +314,7 @@ bpf_expand_prologue (void)
     {
       if ((!fixed_regs[regno]
 	   && df_regs_ever_live_p (regno)
-	   && !call_used_regs[regno])
+	   && !call_used_or_fixed_reg_p (regno))
 	  || (cfun->calls_alloca
 	      && regno == STACK_POINTER_REGNUM))
 	{
@@ -374,7 +374,7 @@ bpf_expand_epilogue (void)
     {
       if ((!fixed_regs[regno]
 	   && df_regs_ever_live_p (regno)
-	   && !call_used_regs[regno])
+	   && !call_used_or_fixed_reg_p (regno))
 	  || (cfun->calls_alloca
 	      && regno == STACK_POINTER_REGNUM))
 	{
Index: gcc/config/c6x/c6x.c
===================================================================
--- gcc/config/c6x/c6x.c	2019-09-10 17:22:44.686419271 +0100
+++ gcc/config/c6x/c6x.c	2019-09-10 17:22:54.030354272 +0100
@@ -2532,7 +2532,7 @@ must_reload_pic_reg_p (void)
 c6x_save_reg (unsigned int regno)
 {
   return ((df_regs_ever_live_p (regno)
-	   && !call_used_regs[regno]
+	   && !call_used_or_fixed_reg_p (regno)
 	   && !fixed_regs[regno])
 	  || (regno == RETURN_ADDR_REGNO
 	      && (df_regs_ever_live_p (regno)
@@ -6694,7 +6694,7 @@ c6x_regno_reg_class (int reg)
   if (A_REGNO_P (reg))
     return NONPREDICATE_A_REGS;
 
-  if (call_used_regs[reg])
+  if (call_used_or_fixed_reg_p (reg))
     return CALL_USED_B_REGS;
 
   return B_REGS;
Index: gcc/config/cr16/cr16.c
===================================================================
--- gcc/config/cr16/cr16.c	2019-08-20 09:53:27.534264051 +0100
+++ gcc/config/cr16/cr16.c	2019-09-10 17:22:54.030354272 +0100
@@ -367,7 +367,7 @@ cr16_compute_save_regs (void)
       /* If this reg is used and not call-used (except RA), save it.  */
       if (cr16_interrupt_function_p ())
 	{
-	  if (!crtl->is_leaf && call_used_regs[regno])
+	  if (!crtl->is_leaf && call_used_or_fixed_reg_p (regno))
 	    /* This is a volatile reg in a non-leaf interrupt routine - save 
 	       it for the sake of its sons.  */
 	    current_frame_info.save_regs[regno] = 1;
@@ -382,7 +382,8 @@ cr16_compute_save_regs (void)
 	{
 	  /* If this reg is used and not call-used (except RA), save it.  */
 	  if (df_regs_ever_live_p (regno)
-	      && (!call_used_regs[regno] || regno == RETURN_ADDRESS_REGNUM))
+	      && (!call_used_or_fixed_reg_p (regno)
+		  || regno == RETURN_ADDRESS_REGNUM))
 	    current_frame_info.save_regs[regno] = 1;
 	  else
 	    current_frame_info.save_regs[regno] = 0;
Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c	2019-08-20 09:53:27.534264051 +0100
+++ gcc/config/cris/cris.c	2019-09-10 17:22:54.030354272 +0100
@@ -716,13 +716,13 @@ cris_reg_saved_in_regsave_area (unsigned
 {
   return
     (((df_regs_ever_live_p (regno)
-       && !call_used_regs[regno])
+       && !call_used_or_fixed_reg_p (regno))
       || (regno == PIC_OFFSET_TABLE_REGNUM
 	  && (got_really_used
 	      /* It is saved anyway, if there would be a gap.  */
 	      || (flag_pic
 		  && df_regs_ever_live_p (regno + 1)
-		  && !call_used_regs[regno + 1]))))
+		  && !call_used_or_fixed_reg_p (regno + 1)))))
      && (regno != FRAME_POINTER_REGNUM || !frame_pointer_needed)
      && regno != CRIS_SRP_REGNUM)
     || (crtl->calls_eh_return
Index: gcc/config/epiphany/epiphany.c
===================================================================
--- gcc/config/epiphany/epiphany.c	2019-09-10 17:22:44.690419243 +0100
+++ gcc/config/epiphany/epiphany.c	2019-09-10 17:22:54.030354272 +0100
@@ -434,7 +434,7 @@ epiphany_init_reg_tables (void)
 	epiphany_regno_reg_class[i] = LR_REGS;
       else if (i <= 7 && TARGET_PREFER_SHORT_INSN_REGS)
 	epiphany_regno_reg_class[i] = SHORT_INSN_REGS;
-      else if (call_used_regs[i]
+      else if (call_used_or_fixed_reg_p (i)
 	       && TEST_HARD_REG_BIT (reg_class_contents[GENERAL_REGS], i))
 	epiphany_regno_reg_class[i] = SIBCALL_REGS;
       else if (i >= CORE_CONTROL_FIRST && i <= CORE_CONTROL_LAST)
@@ -1066,8 +1066,8 @@ #define RETURN_ADDR_MASK (1 << (RETURN_A
 #define MUST_SAVE_REGISTER(regno, interrupt_p) \
   ((df_regs_ever_live_p (regno) \
     || (interrupt_p && !crtl->is_leaf \
-	&& call_used_regs[regno] && !fixed_regs[regno])) \
-   && (!call_used_regs[regno] || regno == GPR_LR \
+	&& call_used_or_fixed_reg_p (regno) && !fixed_regs[regno])) \
+   && (!call_used_or_fixed_reg_p (regno) || regno == GPR_LR \
        || (interrupt_p && regno != GPR_SP)))
 
 #define MUST_SAVE_RETURN_ADDR 0
@@ -2892,8 +2892,8 @@ epiphany_output_mi_thunk (FILE *file, tr
 
   assemble_start_function (thunk, fnname);
   /* We use IP and R16 as a scratch registers.  */
-  gcc_assert (call_used_regs [GPR_IP]);
-  gcc_assert (call_used_regs [GPR_16]);
+  gcc_assert (call_used_or_fixed_reg_p (GPR_IP));
+  gcc_assert (call_used_or_fixed_reg_p (GPR_16));
 
   /* Add DELTA.  When possible use a plain add, otherwise load it into
      a register first. */
@@ -2999,7 +2999,7 @@ epiphany_start_function (FILE *file, con
 	    fputs ("\tstrd r0,[sp,-1]\n", file);
 	  else
 	    tmp = GPR_16;
-	  gcc_assert (call_used_regs[tmp]);
+	  gcc_assert (call_used_or_fixed_reg_p (tmp));
 	  fprintf (file, "\tmov r%d,%%low(", tmp);
 	  assemble_name (file, dst_name);
 	  fprintf (file, ")\n"
Index: gcc/config/fr30/fr30.c
===================================================================
--- gcc/config/fr30/fr30.c	2019-08-20 09:53:27.534264051 +0100
+++ gcc/config/fr30/fr30.c	2019-09-10 17:22:54.038354215 +0100
@@ -141,7 +141,7 @@ #define MUST_SAVE_REGISTER(regno)      \
   (   (regno) != RETURN_POINTER_REGNUM \
    && (regno) != FRAME_POINTER_REGNUM  \
    && df_regs_ever_live_p (regno)      \
-   && ! call_used_regs [regno]         )
+   && ! call_used_or_fixed_reg_p (regno))
 
 #define MUST_SAVE_FRAME_POINTER	 (df_regs_ever_live_p (FRAME_POINTER_REGNUM)  || frame_pointer_needed)
 #define MUST_SAVE_RETURN_POINTER (df_regs_ever_live_p (RETURN_POINTER_REGNUM) || crtl->profile)
Index: gcc/config/frv/frv.c
===================================================================
--- gcc/config/frv/frv.c	2019-09-10 17:22:48.550392392 +0100
+++ gcc/config/frv/frv.c	2019-09-10 17:22:54.038354215 +0100
@@ -1101,7 +1101,8 @@ frv_stack_info (void)
 	default:
 	  for (regno = first; regno <= last; regno++)
 	    {
-	      if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+	      if ((df_regs_ever_live_p (regno)
+		   && !call_used_or_fixed_reg_p (regno))
 		  || (crtl->calls_eh_return
 		      && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM))
 		  || (!TARGET_FDPIC && flag_pic
Index: gcc/config/ft32/ft32.c
===================================================================
--- gcc/config/ft32/ft32.c	2019-08-20 09:53:06.630416173 +0100
+++ gcc/config/ft32/ft32.c	2019-09-10 17:22:54.042354189 +0100
@@ -411,7 +411,7 @@ ft32_compute_frame (void)
 
   /* Save callee-saved registers.  */
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-    if (df_regs_ever_live_p (regno) && (!call_used_regs[regno]))
+    if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
       cfun->machine->callee_saved_reg_size += 4;
 
   cfun->machine->size_for_adjusting_sp =
@@ -475,7 +475,7 @@ ft32_expand_prologue (void)
     {
       for (regno = FIRST_PSEUDO_REGISTER; regno-- > 0;)
 	{
-	  if (!fixed_regs[regno] && !call_used_regs[regno]
+	  if (!fixed_regs[regno] && !call_used_or_fixed_reg_p (regno)
 	      && df_regs_ever_live_p (regno))
 	    {
 	      rtx preg = gen_rtx_REG (Pmode, regno);
@@ -489,7 +489,7 @@ ft32_expand_prologue (void)
       for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
 	{
 	  if (!fixed_regs[regno] && df_regs_ever_live_p (regno)
-	      && !call_used_regs[regno])
+	      && !call_used_or_fixed_reg_p (regno))
 	    {
 	      insn = emit_insn (gen_movsi_push (gen_rtx_REG (Pmode, regno)));
 	      RTX_FRAME_RELATED_P (insn) = 1;
@@ -554,7 +554,7 @@ ft32_expand_epilogue (void)
     {
       for (regno = FIRST_PSEUDO_REGISTER; regno-- > 0;)
         {
-          if (!fixed_regs[regno] && !call_used_regs[regno]
+          if (!fixed_regs[regno] && !call_used_or_fixed_reg_p (regno)
               && df_regs_ever_live_p (regno))
             {
               rtx preg = gen_rtx_REG (Pmode, regno);
Index: gcc/config/gcn/gcn.c
===================================================================
--- gcc/config/gcn/gcn.c	2019-09-09 18:59:20.844063337 +0100
+++ gcc/config/gcn/gcn.c	2019-09-10 17:22:54.042354189 +0100
@@ -2540,7 +2540,7 @@ gcn_compute_frame_offsets (void)
   offsets->callee_saves = offsets->lr_needs_saving ? 8 : 0;
 
   for (int regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-    if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| ((regno & ~1) == HARD_FRAME_POINTER_REGNUM
 	    && frame_pointer_needed))
       offsets->callee_saves += (VGPR_REGNO_P (regno) ? 256 : 4);
@@ -2572,7 +2572,7 @@ move_callee_saved_registers (rtx sp, mac
 
   /* Move scalars into two vector registers.  */
   for (regno = 0, saved_scalars = 0; regno < FIRST_VGPR_REG; regno++)
-    if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| ((regno & ~1) == LINK_REGNUM && offsets->lr_needs_saving)
 	|| ((regno & ~1) == HARD_FRAME_POINTER_REGNUM
 	    && offsets->need_frame_pointer))
@@ -2618,7 +2618,7 @@ move_callee_saved_registers (rtx sp, mac
   /* Move vectors.  */
   for (regno = FIRST_VGPR_REG, offset = offsets->pretend_size;
        regno < FIRST_PSEUDO_REGISTER; regno++)
-    if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| (regno == VGPR_REGNO (6) && saved_scalars > 0)
 	|| (regno == VGPR_REGNO (7) && saved_scalars > 63))
       {
Index: gcc/config/h8300/h8300.c
===================================================================
--- gcc/config/h8300/h8300.c	2019-08-20 09:53:06.630416173 +0100
+++ gcc/config/h8300/h8300.c	2019-09-10 17:22:54.042354189 +0100
@@ -485,7 +485,8 @@ #define WORD_REG_USED(regno)						\
    && ! TREE_THIS_VOLATILE (current_function_decl)			\
    && (h8300_saveall_function_p (current_function_decl)			\
        /* Save any call saved register that was used.  */		\
-       || (df_regs_ever_live_p (regno) && !call_used_regs[regno])	\
+       || (df_regs_ever_live_p (regno)					\
+	   && !call_used_or_fixed_reg_p (regno))			\
        /* Save the frame pointer if it was used.  */			\
        || (regno == HARD_FRAME_POINTER_REGNUM && df_regs_ever_live_p (regno)) \
        /* Save any register used in an interrupt handler.  */		\
@@ -494,7 +495,7 @@ #define WORD_REG_USED(regno)						\
        /* Save call clobbered registers in non-leaf interrupt		\
 	  handlers.  */							\
        || (h8300_current_function_interrupt_function_p ()		\
-	   && call_used_regs[regno]					\
+	   && call_used_or_fixed_reg_p (regno)				\
 	   && !crtl->is_leaf)))
 
 /* We use this to wrap all emitted insns in the prologue.  */
Index: gcc/config/i386/i386-options.c
===================================================================
--- gcc/config/i386/i386-options.c	2019-08-20 09:49:51.915832987 +0100
+++ gcc/config/i386/i386-options.c	2019-09-10 17:22:54.042354189 +0100
@@ -3076,7 +3076,7 @@ ix86_set_current_function (tree fndecl)
      Avoid expensive re-initialization of init_regs each time we switch
      function context.  */
   if (TARGET_64BIT
-      && (call_used_regs[SI_REG]
+      && (call_used_or_fixed_reg_p (SI_REG)
 	  == (cfun->machine->call_abi == MS_ABI)))
     reinit_regs ();
   /* Need to re-initialize init_regs if caller-saved registers are
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	2019-09-09 18:59:20.848063309 +0100
+++ gcc/config/i386/i386.c	2019-09-10 17:22:54.046354161 +0100
@@ -5665,7 +5665,7 @@ ix86_save_reg (unsigned int regno, bool
     return true;
 
   return (df_regs_ever_live_p (regno)
-	  && !call_used_regs[regno]
+	  && !call_used_or_fixed_reg_p (regno)
 	  && !fixed_regs[regno]
 	  && (regno != HARD_FRAME_POINTER_REGNUM || !frame_pointer_needed));
 }
@@ -7837,7 +7837,7 @@ ix86_expand_prologue (void)
 	       "around by avoiding functions with aggregate return.");
 
       /* Only need to push parameter pointer reg if it is caller saved.  */
-      if (!call_used_regs[REGNO (crtl->drap_reg)])
+      if (!call_used_or_fixed_reg_p (REGNO (crtl->drap_reg)))
 	{
 	  /* Push arg pointer reg */
 	  insn = emit_insn (gen_push (crtl->drap_reg));
@@ -8012,7 +8012,7 @@ ix86_expand_prologue (void)
 	  if (ix86_static_chain_on_stack)
 	    stack_size += UNITS_PER_WORD;
 
-	  if (!call_used_regs[REGNO (crtl->drap_reg)])
+	  if (!call_used_or_fixed_reg_p (REGNO (crtl->drap_reg)))
 	    stack_size += UNITS_PER_WORD;
 
 	  /* This over-estimates by 1 minimal-stack-alignment-unit but
@@ -8903,7 +8903,7 @@ ix86_expand_epilogue (int style)
 
       if (ix86_static_chain_on_stack)
 	param_ptr_offset += UNITS_PER_WORD;
-      if (!call_used_regs[REGNO (crtl->drap_reg)])
+      if (!call_used_or_fixed_reg_p (REGNO (crtl->drap_reg)))
 	param_ptr_offset += UNITS_PER_WORD;
 
       insn = emit_insn (gen_rtx_SET
@@ -8921,7 +8921,7 @@ ix86_expand_epilogue (int style)
 				  GEN_INT (param_ptr_offset)));
       RTX_FRAME_RELATED_P (insn) = 1;
 
-      if (!call_used_regs[REGNO (crtl->drap_reg)])
+      if (!call_used_or_fixed_reg_p (REGNO (crtl->drap_reg)))
 	ix86_emit_restore_reg_using_pop (crtl->drap_reg);
     }
 
@@ -19643,12 +19643,12 @@ x86_order_regs_for_local_alloc (void)
 
    /* First allocate the local general purpose registers.  */
    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-     if (GENERAL_REGNO_P (i) && call_used_regs[i])
+     if (GENERAL_REGNO_P (i) && call_used_or_fixed_reg_p (i))
 	reg_alloc_order [pos++] = i;
 
    /* Global general purpose registers.  */
    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-     if (GENERAL_REGNO_P (i) && !call_used_regs[i])
+     if (GENERAL_REGNO_P (i) && !call_used_or_fixed_reg_p (i))
 	reg_alloc_order [pos++] = i;
 
    /* x87 registers come first in case we are doing FP math
Index: gcc/config/i386/predicates.md
===================================================================
--- gcc/config/i386/predicates.md	2019-06-18 09:35:55.097868012 +0100
+++ gcc/config/i386/predicates.md	2019-09-10 17:22:54.050354133 +0100
@@ -690,7 +690,7 @@ (define_predicate "sibcall_memory_operan
   if (GET_CODE (op) == PLUS && REG_P (XEXP (op, 0)))
     {
       int regno = REGNO (XEXP (op, 0));
-      if (!HARD_REGISTER_NUM_P (regno) || call_used_regs[regno])
+      if (!HARD_REGISTER_NUM_P (regno) || call_used_or_fixed_reg_p (regno))
 	{
 	  op = XEXP (op, 1);
 	  if (GOT32_symbol_operand (op, VOIDmode))
Index: gcc/config/ia64/ia64.c
===================================================================
--- gcc/config/ia64/ia64.c	2019-09-09 18:59:01.384200725 +0100
+++ gcc/config/ia64/ia64.c	2019-09-10 17:22:54.050354133 +0100
@@ -2523,11 +2523,12 @@ emit_safe_across_calls (void)
   out_state = 0;
   while (1)
     {
-      while (rs < 64 && call_used_regs[PR_REG (rs)])
+      while (rs < 64 && call_used_or_fixed_reg_p (PR_REG (rs)))
 	rs++;
       if (rs >= 64)
 	break;
-      for (re = rs + 1; re < 64 && ! call_used_regs[PR_REG (re)]; re++)
+      for (re = rs + 1;
+	   re < 64 && ! call_used_or_fixed_reg_p (PR_REG (re)); re++)
 	continue;
       if (out_state == 0)
 	{
@@ -2593,7 +2594,7 @@ find_gr_spill (enum ia64_frame_regs r, i
     {
       for (regno = GR_REG (1); regno <= GR_REG (31); regno++)
 	if (! df_regs_ever_live_p (regno)
-	    && call_used_regs[regno]
+	    && call_used_or_fixed_reg_p (regno)
 	    && ! fixed_regs[regno]
 	    && ! global_regs[regno]
 	    && ((current_frame_info.gr_used_mask >> regno) & 1) == 0
@@ -2641,7 +2642,7 @@ next_scratch_gr_reg (void)
   for (i = 0; i < 32; ++i)
     {
       regno = (last_scratch_gr_reg + i + 1) & 31;
-      if (call_used_regs[regno]
+      if (call_used_or_fixed_reg_p (regno)
 	  && ! fixed_regs[regno]
 	  && ! global_regs[regno]
 	  && ((current_frame_info.gr_used_mask >> regno) & 1) == 0)
@@ -2762,7 +2763,7 @@ ia64_compute_frame_size (HOST_WIDE_INT s
      which will always wind up on the stack.  */
 
   for (regno = FR_REG (2); regno <= FR_REG (127); regno++)
-    if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && ! call_used_or_fixed_reg_p (regno))
       {
 	SET_HARD_REG_BIT (mask, regno);
 	spill_size += 16;
@@ -2771,7 +2772,7 @@ ia64_compute_frame_size (HOST_WIDE_INT s
       }
 
   for (regno = GR_REG (1); regno <= GR_REG (31); regno++)
-    if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && ! call_used_or_fixed_reg_p (regno))
       {
 	SET_HARD_REG_BIT (mask, regno);
 	spill_size += 8;
@@ -2780,7 +2781,7 @@ ia64_compute_frame_size (HOST_WIDE_INT s
       }
 
   for (regno = BR_REG (1); regno <= BR_REG (7); regno++)
-    if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && ! call_used_or_fixed_reg_p (regno))
       {
 	SET_HARD_REG_BIT (mask, regno);
 	spill_size += 8;
@@ -2840,7 +2841,8 @@ ia64_compute_frame_size (HOST_WIDE_INT s
     }
   else
     {
-      if (df_regs_ever_live_p (BR_REG (0)) && ! call_used_regs[BR_REG (0)])
+      if (df_regs_ever_live_p (BR_REG (0))
+	  && ! call_used_or_fixed_reg_p (BR_REG (0)))
 	{
 	  SET_HARD_REG_BIT (mask, BR_REG (0));
 	  extra_spill_size += 8;
@@ -2894,7 +2896,7 @@ ia64_compute_frame_size (HOST_WIDE_INT s
 
   /* See if we need to store the predicate register block.  */
   for (regno = PR_REG (0); regno <= PR_REG (63); regno++)
-    if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && ! call_used_or_fixed_reg_p (regno))
       break;
   if (regno <= PR_REG (63))
     {
Index: gcc/config/iq2000/iq2000.h
===================================================================
--- gcc/config/iq2000/iq2000.h	2019-03-08 18:15:37.880735866 +0000
+++ gcc/config/iq2000/iq2000.h	2019-09-10 17:22:54.050354133 +0100
@@ -687,7 +687,7 @@ #define MAX_ARGS_IN_REGISTERS	8
 /* Tell prologue and epilogue if register REGNO should be saved / restored.  */
 
 #define MUST_SAVE_REGISTER(regno) \
-  ((df_regs_ever_live_p (regno) && !call_used_regs[regno])		\
+  ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))	\
   || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed)	\
    || (regno == (GP_REG_FIRST + 31) && df_regs_ever_live_p (GP_REG_FIRST + 31)))
 
Index: gcc/config/lm32/lm32.c
===================================================================
--- gcc/config/lm32/lm32.c	2019-08-20 09:53:27.542263993 +0100
+++ gcc/config/lm32/lm32.c	2019-09-10 17:22:54.050354133 +0100
@@ -457,7 +457,7 @@ lm32_compute_frame_size (int size)
      and calculate size required to store them in the stack.  */
   for (regno = 1; regno < SP_REGNUM; regno++)
     {
-      if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+      if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	{
 	  reg_save_mask |= 1 << regno;
 	  callee_size += UNITS_PER_WORD;
Index: gcc/config/m32c/m32c.c
===================================================================
--- gcc/config/m32c/m32c.c	2019-09-09 18:59:15.980097678 +0100
+++ gcc/config/m32c/m32c.c	2019-09-10 17:22:54.054354104 +0100
@@ -1114,7 +1114,7 @@ need_to_save (int regno)
 	  ))
     return 1;
   if (df_regs_ever_live_p (regno)
-      && (!call_used_regs[regno] || cfun->machine->is_interrupt))
+      && (!call_used_or_fixed_reg_p (regno) || cfun->machine->is_interrupt))
     return 1;
   return 0;
 }
Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c	2019-09-09 18:59:01.388200696 +0100
+++ gcc/config/m68k/m68k.c	2019-09-10 17:22:54.054354104 +0100
@@ -944,7 +944,7 @@ m68k_save_reg (unsigned int regno, bool
       if (df_regs_ever_live_p (regno))
 	return true;
 
-      if (!crtl->is_leaf && call_used_regs[regno])
+      if (!crtl->is_leaf && call_used_or_fixed_reg_p (regno))
 	return true;
     }
 
@@ -953,7 +953,7 @@ m68k_save_reg (unsigned int regno, bool
     return false;
 
   /* Otherwise save everything that isn't call-clobbered.  */
-  return !call_used_regs[regno];
+  return !call_used_or_fixed_reg_p (regno);
 }
 
 /* Emit RTL for a MOVEM or FMOVEM instruction.  BASE + OFFSET represents
Index: gcc/config/mcore/mcore.c
===================================================================
--- gcc/config/mcore/mcore.c	2019-08-20 09:53:27.542263993 +0100
+++ gcc/config/mcore/mcore.c	2019-09-10 17:22:54.054354104 +0100
@@ -316,7 +316,7 @@ calc_live_regs (int * count)
 
   for (reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++)
     {
-      if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
+      if (df_regs_ever_live_p (reg) && !call_used_or_fixed_reg_p (reg))
 	{
 	  (*count)++;
 	  live_regs_mask |= (1 << reg);
Index: gcc/config/microblaze/microblaze.c
===================================================================
--- gcc/config/microblaze/microblaze.c	2019-08-20 09:53:06.638416115 +0100
+++ gcc/config/microblaze/microblaze.c	2019-09-10 17:22:54.054354104 +0100
@@ -2012,7 +2012,7 @@ microblaze_must_save_register (int regno
       (regno == MB_ABI_PIC_ADDR_REGNUM) && df_regs_ever_live_p (regno))
     return 1;
 
-  if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+  if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
     return 1;
 
   if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c	2019-08-20 09:53:27.546263962 +0100
+++ gcc/config/mmix/mmix.c	2019-09-10 17:22:54.054354104 +0100
@@ -464,7 +464,8 @@ mmix_opposite_regno (int regno, int inco
 int
 mmix_local_regno (int regno)
 {
-  return regno <= MMIX_LAST_STACK_REGISTER_REGNUM && !call_used_regs[regno];
+  return (regno <= MMIX_LAST_STACK_REGISTER_REGNUM
+	  && !call_used_or_fixed_reg_p (regno));
 }
 
 /* TARGET_PREFERRED_RELOAD_CLASS.
@@ -604,7 +605,7 @@ mmix_initial_elimination_offset (int fro
   for (regno = MMIX_FIRST_GLOBAL_REGNUM;
        regno <= 255;
        regno++)
-    if ((df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+    if ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       fp_sp_offset += 8;
 
@@ -866,7 +867,7 @@ mmix_reorg (void)
   for (regno = MMIX_LAST_STACK_REGISTER_REGNUM;
        regno >= 0;
        regno--)
-    if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if ((df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| (regno == MMIX_FRAME_POINTER_REGNUM && frame_pointer_needed))
       break;
 
@@ -1958,7 +1959,7 @@ mmix_use_simple_return (void)
     /* Note that we assume that the frame-pointer-register is one of these
        registers, in which case we don't count it here.  */
     if ((((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed)
-	  && df_regs_ever_live_p (regno) && !call_used_regs[regno]))
+	  && df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno)))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       return 0;
 
@@ -1994,7 +1995,7 @@ mmix_expand_prologue (void)
     /* Note that we assume that the frame-pointer-register is one of these
        registers, in which case we don't count it here.  */
     if ((((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed)
-	  && df_regs_ever_live_p (regno) && !call_used_regs[regno]))
+	  && df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno)))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       stack_space_to_allocate += 8;
 
@@ -2180,7 +2181,7 @@ mmix_expand_prologue (void)
        regno >= MMIX_FIRST_GLOBAL_REGNUM;
        regno--)
     if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed)
-	 && df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+	 && df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       {
 	rtx insn;
@@ -2233,7 +2234,7 @@ mmix_expand_epilogue (void)
        regno >= MMIX_FIRST_GLOBAL_REGNUM;
        regno--)
     if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed)
-	 && df_regs_ever_live_p (regno) && !call_used_regs[regno])
+	 && df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       stack_space_to_deallocate += 8;
 
@@ -2262,7 +2263,7 @@ mmix_expand_epilogue (void)
        regno <= 255;
        regno++)
     if (((regno != MMIX_FRAME_POINTER_REGNUM || !frame_pointer_needed)
-	 && df_regs_ever_live_p (regno) && !call_used_regs[regno])
+	 && df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
 	|| IS_MMIX_EH_RETURN_DATA_REG (regno))
       {
 	if (offset > 255)
Index: gcc/config/moxie/moxie.c
===================================================================
--- gcc/config/moxie/moxie.c	2019-08-20 09:53:06.638416115 +0100
+++ gcc/config/moxie/moxie.c	2019-09-10 17:22:54.054354104 +0100
@@ -264,7 +264,7 @@ moxie_compute_frame (void)
 
   /* Save callee-saved registers.  */
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-    if (df_regs_ever_live_p (regno) && (! call_used_regs[regno]))
+    if (df_regs_ever_live_p (regno) && (! call_used_or_fixed_reg_p (regno)))
       cfun->machine->callee_saved_reg_size += 4;
 
   cfun->machine->size_for_adjusting_sp = 
@@ -288,7 +288,9 @@ moxie_expand_prologue (void)
   /* Save callee-saved registers.  */
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
     {
-      if (!fixed_regs[regno] && df_regs_ever_live_p (regno) && !call_used_regs[regno])
+      if (!fixed_regs[regno]
+	  && df_regs_ever_live_p (regno)
+	  && !call_used_or_fixed_reg_p (regno))
 	{
 	  insn = emit_insn (gen_movsi_push (gen_rtx_REG (Pmode, regno)));
 	  RTX_FRAME_RELATED_P (insn) = 1;
@@ -349,7 +351,7 @@ moxie_expand_epilogue (void)
 	  emit_insn (gen_addsi3 (reg, reg, hard_frame_pointer_rtx));
 	}
       for (regno = FIRST_PSEUDO_REGISTER; regno-- > 0; )
-	if (!fixed_regs[regno] && !call_used_regs[regno]
+	if (!fixed_regs[regno] && !call_used_or_fixed_reg_p (regno)
 	    && df_regs_ever_live_p (regno))
 	  {
 	    rtx preg = gen_rtx_REG (Pmode, regno);
Index: gcc/config/msp430/msp430.c
===================================================================
--- gcc/config/msp430/msp430.c	2019-09-05 08:49:31.309736192 +0100
+++ gcc/config/msp430/msp430.c	2019-09-10 17:22:54.058354078 +0100
@@ -1152,7 +1152,7 @@ msp430_preserve_reg_p (int regno)
 	return true;
     }
 
-  if (!call_used_regs[regno]
+  if (!call_used_or_fixed_reg_p (regno)
       && df_regs_ever_live_p (regno))
     return true;
 
Index: gcc/config/nds32/nds32.h
===================================================================
--- gcc/config/nds32/nds32.h	2019-03-08 18:15:37.708736520 +0000
+++ gcc/config/nds32/nds32.h	2019-09-10 17:22:54.058354078 +0100
@@ -226,7 +226,7 @@ #define NDS32_ARG_PARTIAL_IN_FPR_REG_P(r
    As long as the register satisfies both criteria above,
    it is required to be saved.  */
 #define NDS32_REQUIRED_CALLEE_SAVED_P(regno)                  \
-  ((!call_used_regs[regno]) && (df_regs_ever_live_p (regno)))
+  (!call_used_or_fixed_reg_p (regno) && df_regs_ever_live_p (regno))
 
 /* This macro is to check if the push25/pop25 are available to be used
    for code generation.  Because pop25 also performs return behavior,
Index: gcc/config/nios2/nios2.c
===================================================================
--- gcc/config/nios2/nios2.c	2019-08-20 09:53:06.638416115 +0100
+++ gcc/config/nios2/nios2.c	2019-09-10 17:22:54.058354078 +0100
@@ -1080,7 +1080,7 @@ prologue_saved_reg_p (unsigned regno)
 {
   gcc_assert (GP_REG_P (regno));
   
-  if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+  if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
     return true;
 
   if (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed)
Index: gcc/config/or1k/or1k.c
===================================================================
--- gcc/config/or1k/or1k.c	2019-08-20 09:53:06.642416084 +0100
+++ gcc/config/or1k/or1k.c	2019-09-10 17:22:54.058354078 +0100
@@ -100,7 +100,7 @@ or1k_option_override (void)
 callee_saved_regno_p (int regno)
 {
   /* Check call-saved registers.  */
-  if (!call_used_regs[regno] && df_regs_ever_live_p (regno))
+  if (!call_used_or_fixed_reg_p (regno) && df_regs_ever_live_p (regno))
     return true;
 
   switch (regno)
Index: gcc/config/pa/pa.c
===================================================================
--- gcc/config/pa/pa.c	2019-08-20 09:53:16.214346430 +0100
+++ gcc/config/pa/pa.c	2019-09-10 17:22:54.058354078 +0100
@@ -4053,7 +4053,7 @@ pa_expand_prologue (void)
 	}
 
       for (i = 18; i >= 4; i--)
-	if (df_regs_ever_live_p (i) && ! call_used_regs[i])
+	if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
 	  {
 	    store_reg (i, offset, HARD_FRAME_POINTER_REGNUM);
 	    offset += UNITS_PER_WORD;
@@ -4093,7 +4093,7 @@ pa_expand_prologue (void)
 	}
 
       for (i = 18; i >= 3; i--)
-      	if (df_regs_ever_live_p (i) && ! call_used_regs[i])
+	if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
 	  {
 	    /* If merge_sp_adjust_with_store is nonzero, then we can
 	       optimize the first GR save.  */
@@ -4394,7 +4394,7 @@ pa_expand_epilogue (void)
 	}
 
       for (i = 18; i >= 4; i--)
-	if (df_regs_ever_live_p (i) && ! call_used_regs[i])
+	if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
 	  {
 	    load_reg (i, offset, HARD_FRAME_POINTER_REGNUM);
 	    offset += UNITS_PER_WORD;
@@ -4431,7 +4431,7 @@ pa_expand_epilogue (void)
 
       for (i = 18; i >= 3; i--)
 	{
-	  if (df_regs_ever_live_p (i) && ! call_used_regs[i])
+	  if (df_regs_ever_live_p (i) && !call_used_or_fixed_reg_p (i))
 	    {
 	      /* Only for the first load.
 	         merge_sp_adjust_with_load holds the register load
Index: gcc/config/pdp11/pdp11.c
===================================================================
--- gcc/config/pdp11/pdp11.c	2019-09-09 18:59:01.392200668 +0100
+++ gcc/config/pdp11/pdp11.c	2019-09-10 17:22:54.058354078 +0100
@@ -313,7 +313,7 @@ #define TARGET_STACK_PROTECT_RUNTIME_ENA
 static inline bool
 pdp11_saved_regno (unsigned regno)
 {
-  return !call_used_regs[regno] && df_regs_ever_live_p (regno);
+  return !call_used_or_fixed_reg_p (regno) && df_regs_ever_live_p (regno);
 }
 
 /* Expand the function prologue.  */
Index: gcc/config/pru/pru.c
===================================================================
--- gcc/config/pru/pru.c	2019-08-20 09:53:06.642416084 +0100
+++ gcc/config/pru/pru.c	2019-09-10 17:22:54.070353994 +0100
@@ -443,7 +443,7 @@ prologue_saved_reg_p (int regno)
 {
   gcc_assert (GP_REG_P (regno));
 
-  if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+  if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
     return true;
 
   /* 32-bit FP.  */
Index: gcc/config/riscv/riscv.c
===================================================================
--- gcc/config/riscv/riscv.c	2019-09-09 12:19:41.421572005 +0100
+++ gcc/config/riscv/riscv.c	2019-09-10 17:22:54.074353964 +0100
@@ -3442,7 +3442,7 @@ riscv_frame_set (rtx mem, rtx reg)
 static bool
 riscv_save_reg_p (unsigned int regno)
 {
-  bool call_saved = !global_regs[regno] && !call_used_regs[regno];
+  bool call_saved = !global_regs[regno] && !call_used_or_fixed_reg_p (regno);
   bool might_clobber = crtl->saves_all_registers
 		       || df_regs_ever_live_p (regno);
 
@@ -3473,7 +3473,7 @@ riscv_save_reg_p (unsigned int regno)
       /* We must save every register used in this function.  If this is not a
 	 leaf function, then we must save all temporary registers.  */
       if (df_regs_ever_live_p (regno)
-	  || (!crtl->is_leaf && call_used_regs[regno]))
+	  || (!crtl->is_leaf && call_used_or_fixed_reg_p (regno)))
 	return true;
     }
 
@@ -4198,7 +4198,7 @@ riscv_epilogue_uses (unsigned int regno)
       /* An interrupt function restores temp regs, so we must indicate that
 	 they are live at function end.  */
       if (df_regs_ever_live_p (regno)
-	    || (!crtl->is_leaf && call_used_regs[regno]))
+	    || (!crtl->is_leaf && call_used_or_fixed_reg_p (regno)))
 	return true;
     }
 
@@ -4361,7 +4361,7 @@ riscv_hard_regno_mode_ok (unsigned int r
       /* Only use callee-saved registers if a potential callee is guaranteed
 	 to spill the requisite width.  */
       if (GET_MODE_UNIT_SIZE (mode) > UNITS_PER_FP_REG
-	  || (!call_used_regs[regno]
+	  || (!call_used_or_fixed_reg_p (regno)
 	      && GET_MODE_UNIT_SIZE (mode) > UNITS_PER_FP_ARG))
 	return false;
     }
@@ -4370,7 +4370,8 @@ riscv_hard_regno_mode_ok (unsigned int r
 
   /* Require same callee-savedness for all registers.  */
   for (unsigned i = 1; i < nregs; i++)
-    if (call_used_regs[regno] != call_used_regs[regno + i])
+    if (call_used_or_fixed_reg_p (regno)
+	!= call_used_or_fixed_reg_p (regno + i))
       return false;
 
   return true;
Index: gcc/config/rl78/rl78.c
===================================================================
--- gcc/config/rl78/rl78.c	2019-08-20 09:53:06.642416084 +0100
+++ gcc/config/rl78/rl78.c	2019-09-10 17:22:54.074353964 +0100
@@ -723,7 +723,7 @@ need_to_save (unsigned int regno)
 	 any call_used registers, so we have to preserve them.
          We do not have to worry about the frame pointer register
 	 though, as that is handled below.  */
-      if (!crtl->is_leaf && call_used_regs[regno] && regno < 22)
+      if (!crtl->is_leaf && call_used_or_fixed_reg_p (regno) && regno < 22)
 	return true;
 
       /* Otherwise we only have to save a register, call_used
@@ -739,7 +739,7 @@ need_to_save (unsigned int regno)
   if (crtl->calls_eh_return)
     return true;
   if (df_regs_ever_live_p (regno)
-      && !call_used_regs[regno])
+      && !call_used_or_fixed_reg_p (regno))
     return true;
   return false;
 }
Index: gcc/config/rs6000/rs6000-logue.c
===================================================================
--- gcc/config/rs6000/rs6000-logue.c	2019-07-12 08:54:01.593530182 +0100
+++ gcc/config/rs6000/rs6000-logue.c	2019-09-10 17:22:54.074353964 +0100
@@ -117,7 +117,7 @@ save_reg_p (int reg)
 	return true;
     }
 
-  return !call_used_regs[reg] && df_regs_ever_live_p (reg);
+  return !call_used_or_fixed_reg_p (reg) && df_regs_ever_live_p (reg);
 }
 
 /* Return the first fixed-point register that is required to be
@@ -875,7 +875,7 @@ rs6000_stack_info (void)
 
   using_static_chain_p = (cfun->static_chain_decl != NULL_TREE
 			  && df_regs_ever_live_p (STATIC_CHAIN_REGNUM)
-			  && call_used_regs[STATIC_CHAIN_REGNUM]);
+			  && call_used_or_fixed_reg_p (STATIC_CHAIN_REGNUM));
   info->savres_strategy = rs6000_savres_strategy (info, using_static_chain_p);
 
   if (!(info->savres_strategy & SAVE_INLINE_GPRS)
@@ -2082,7 +2082,7 @@ generate_set_vrsave (rtx reg, rs6000_sta
   for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)
     if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
       {
-	if (!epiloguep || call_used_regs [i])
+	if (!epiloguep || call_used_or_fixed_reg_p (i))
 	  clobs[nclobs++] = gen_hard_reg_clobber (V4SImode, i);
 	else
 	  {
@@ -2971,9 +2971,10 @@ rs6000_emit_prologue (void)
   rtx cr_save_rtx = NULL_RTX;
   rtx_insn *insn;
   int strategy;
-  int using_static_chain_p = (cfun->static_chain_decl != NULL_TREE
-			      && df_regs_ever_live_p (STATIC_CHAIN_REGNUM)
-			      && call_used_regs[STATIC_CHAIN_REGNUM]);
+  int using_static_chain_p
+    = (cfun->static_chain_decl != NULL_TREE
+       && df_regs_ever_live_p (STATIC_CHAIN_REGNUM)
+       && call_used_or_fixed_reg_p (STATIC_CHAIN_REGNUM));
   int using_split_stack = (flag_split_stack
                            && (lookup_attribute ("no_split_stack",
                                                  DECL_ATTRIBUTES (cfun->decl))
@@ -3571,7 +3572,7 @@ #define NOT_INUSE(R) do {} while (0)
       emit_insn (gen_prologue_movesi_from_cr (crsave));
 
       for (i = 0; i < 8; i++)
-	if (!call_used_regs[CR0_REGNO + i])
+	if (!call_used_or_fixed_reg_p (CR0_REGNO + i))
 	  {
 	    rtvec p = rtvec_alloc (2);
 	    RTVEC_ELT (p, 0)
@@ -4704,7 +4705,7 @@ rs6000_emit_epilogue (enum epilogue_type
       int i, cr_off = info->ehcr_offset;
 
       for (i = 0; i < 8; i++)
-	if (!call_used_regs[CR0_REGNO + i])
+	if (!call_used_or_fixed_reg_p (CR0_REGNO + i))
 	  {
 	    rtx reg = gen_rtx_REG (SImode, 0);
 	    emit_insn (gen_frame_load (reg, frame_reg_rtx,
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	2019-09-09 18:59:11.468129529 +0100
+++ gcc/config/rs6000/rs6000.c	2019-09-10 17:22:54.078353939 +0100
@@ -1990,7 +1990,7 @@ rs6000_debug_reg_print (int first_regno,
 	    comma = ", ";
 	  }
 
-      if (call_used_regs[r])
+      if (call_used_or_fixed_reg_p (r))
 	{
 	  if (len > 70)
 	    {
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c	2019-08-20 09:53:06.642416084 +0100
+++ gcc/config/rx/rx.c	2019-09-10 17:22:54.078353939 +0100
@@ -1483,10 +1483,10 @@ rx_get_stack_layout (unsigned int * lowe
 	   /* Always save all call clobbered registers inside non-leaf
 	      interrupt handlers, even if they are not live - they may
 	      be used in (non-interrupt aware) routines called from this one.  */
-	   || (call_used_regs[reg]
+	   || (call_used_or_fixed_reg_p (reg)
 	       && is_interrupt_func (NULL_TREE)
 	       && ! crtl->is_leaf))
-	  && (! call_used_regs[reg]
+	  && (! call_used_or_fixed_reg_p (reg)
 	      /* Even call clobbered registered must
 		 be pushed inside interrupt handlers.  */
 	      || is_interrupt_func (NULL_TREE)
Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c	2019-09-09 18:59:15.984097650 +0100
+++ gcc/config/s390/s390.c	2019-09-10 17:22:54.082353911 +0100
@@ -13341,7 +13341,7 @@ s390_call_saved_register_used (tree call
        if (REG_P (parm_rtx))
 	 {
 	   for (reg = 0; reg < REG_NREGS (parm_rtx); reg++)
-	     if (!call_used_regs[reg + REGNO (parm_rtx)])
+	     if (!call_used_or_fixed_reg_p (reg + REGNO (parm_rtx)))
 	       return true;
 	 }
 
@@ -13356,7 +13356,7 @@ s390_call_saved_register_used (tree call
 	       gcc_assert (REG_P (r));
 
 	       for (reg = 0; reg < REG_NREGS (r); reg++)
-		 if (!call_used_regs[reg + REGNO (r)])
+		 if (!call_used_or_fixed_reg_p (reg + REGNO (r)))
 		   return true;
 	     }
 	 }
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	2019-09-10 17:22:48.554392364 +0100
+++ gcc/config/sh/sh.c	2019-09-10 17:22:54.086353882 +0100
@@ -7055,7 +7055,8 @@ calc_live_regs (HARD_REG_SET *live_regs_
 	     || (df_regs_ever_live_p (reg)
 		 && ((!call_really_used_regs[reg]
 		      && !(reg != PIC_OFFSET_TABLE_REGNUM
-			   && fixed_regs[reg] && call_used_regs[reg]))
+			   && fixed_regs[reg]
+			   && call_used_or_fixed_reg_p (reg)))
 		     || (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY)))
 	     || (crtl->calls_eh_return
 		 && (reg == EH_RETURN_DATA_REGNO (0)
@@ -10815,16 +10816,16 @@ sh_output_mi_thunk (FILE *file, tree thu
      registers are used for argument passing, are callee-saved, or reserved.  */
   /* We need to check call_used_regs / fixed_regs in case -fcall_saved-reg /
      -ffixed-reg has been used.  */
-  if (! call_used_regs[0] || fixed_regs[0])
+  if (! call_used_or_fixed_reg_p (0) || fixed_regs[0])
     error ("r0 needs to be available as a call-clobbered register");
   scratch0 = scratch1 = scratch2 = gen_rtx_REG (Pmode, 0);
 
     {
-      if (call_used_regs[1] && ! fixed_regs[1])
+      if (call_used_or_fixed_reg_p (1) && ! fixed_regs[1])
 	scratch1 = gen_rtx_REG (ptr_mode, 1);
       /* N.B., if not TARGET_HITACHI, register 2 is used to pass the pointer
 	 pointing where to return struct values.  */
-      if (call_used_regs[3] && ! fixed_regs[3])
+      if (call_used_or_fixed_reg_p (3) && ! fixed_regs[3])
 	scratch2 = gen_rtx_REG (Pmode, 3);
     }
 
Index: gcc/config/sparc/sparc.c
===================================================================
--- gcc/config/sparc/sparc.c	2019-09-05 08:49:30.881739248 +0100
+++ gcc/config/sparc/sparc.c	2019-09-10 17:22:54.086353882 +0100
@@ -5446,7 +5446,7 @@ sparc_init_modes (void)
 save_global_or_fp_reg_p (unsigned int regno,
 			 int leaf_function ATTRIBUTE_UNUSED)
 {
-  return !call_used_regs[regno] && df_regs_ever_live_p (regno);
+  return !call_used_or_fixed_reg_p (regno) && df_regs_ever_live_p (regno);
 }
 
 /* Return whether the return address register (%i7) is needed.  */
@@ -5474,7 +5474,7 @@ return_addr_reg_needed_p (int leaf_funct
 save_local_or_in_reg_p (unsigned int regno, int leaf_function)
 {
   /* General case: call-saved registers live at some point.  */
-  if (!call_used_regs[regno] && df_regs_ever_live_p (regno))
+  if (!call_used_or_fixed_reg_p (regno) && df_regs_ever_live_p (regno))
     return true;
 
   /* Frame pointer register (%fp) if needed.  */
Index: gcc/config/stormy16/stormy16.c
===================================================================
--- gcc/config/stormy16/stormy16.c	2019-08-20 09:53:27.554263904 +0100
+++ gcc/config/stormy16/stormy16.c	2019-09-10 17:22:54.086353882 +0100
@@ -926,8 +926,8 @@ struct xstormy16_stack_layout
 
 /* Does REGNO need to be saved?  */
 #define REG_NEEDS_SAVE(REGNUM, IFUN)					\
-  ((df_regs_ever_live_p (REGNUM) && ! call_used_regs[REGNUM])		\
-   || (IFUN && ! fixed_regs[REGNUM] && call_used_regs[REGNUM]		\
+  ((df_regs_ever_live_p (REGNUM) && !call_used_or_fixed_reg_p (REGNUM))	\
+   || (IFUN && !fixed_regs[REGNUM] && call_used_or_fixed_reg_p (REGNUM)	\
        && (REGNUM != CARRY_REGNUM)					\
        && (df_regs_ever_live_p (REGNUM) || ! crtl->is_leaf)))
 
@@ -1191,7 +1191,7 @@ xstormy16_expand_epilogue (void)
 int
 xstormy16_epilogue_uses (int regno)
 {
-  if (reload_completed && call_used_regs[regno])
+  if (reload_completed && call_used_or_fixed_reg_p (regno))
     {
       const int ifun = xstormy16_interrupt_function_p ();
       return REG_NEEDS_SAVE (regno, ifun);
Index: gcc/config/tilegx/tilegx.c
===================================================================
--- gcc/config/tilegx/tilegx.c	2019-08-20 09:53:06.646416057 +0100
+++ gcc/config/tilegx/tilegx.c	2019-09-10 17:22:54.090353853 +0100
@@ -3660,7 +3660,7 @@ tilegx_builtin_decl (unsigned code, bool
 static bool
 need_to_save_reg (unsigned int regno)
 {
-  if (!fixed_regs[regno] && !call_used_regs[regno]
+  if (!fixed_regs[regno] && !call_used_or_fixed_reg_p (regno)
       && df_regs_ever_live_p (regno))
     return true;
 
Index: gcc/config/tilepro/tilepro.c
===================================================================
--- gcc/config/tilepro/tilepro.c	2019-08-20 09:53:06.646416057 +0100
+++ gcc/config/tilepro/tilepro.c	2019-09-10 17:22:54.090353853 +0100
@@ -3202,7 +3202,7 @@ tilepro_builtin_decl (unsigned code, boo
 static bool
 need_to_save_reg (unsigned int regno)
 {
-  if (!fixed_regs[regno] && !call_used_regs[regno]
+  if (!fixed_regs[regno] && !call_used_or_fixed_reg_p (regno)
       && df_regs_ever_live_p (regno))
     return true;
 
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c	2019-08-20 09:53:16.218346399 +0100
+++ gcc/config/v850/v850.c	2019-09-10 17:22:54.090353853 +0100
@@ -1461,7 +1461,7 @@ compute_register_save_size (long * p_reg
     {
       /* Find the first register that needs to be saved.  */
       for (i = 0; i <= 31; i++)
-	if (df_regs_ever_live_p (i) && ((! call_used_regs[i])
+	if (df_regs_ever_live_p (i) && ((! call_used_or_fixed_reg_p (i))
 				  || i == LINK_POINTER_REGNUM))
 	  break;
 
@@ -1502,7 +1502,7 @@ compute_register_save_size (long * p_reg
       else
 	{
 	  for (; i <= 31; i++)
-	    if (df_regs_ever_live_p (i) && ((! call_used_regs[i])
+	    if (df_regs_ever_live_p (i) && ((! call_used_or_fixed_reg_p (i))
 				      || i == LINK_POINTER_REGNUM))
 	      {
 		size += 4;
Index: gcc/config/vax/vax.c
===================================================================
--- gcc/config/vax/vax.c	2019-08-20 09:53:06.650416026 +0100
+++ gcc/config/vax/vax.c	2019-09-10 17:22:54.090353853 +0100
@@ -166,7 +166,7 @@ vax_expand_prologue (void)
   rtx insn;
 
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-    if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+    if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
       mask |= 1 << regno;
 
   insn = emit_insn (gen_procedure_entry_mask (GEN_INT (mask)));
Index: gcc/config/visium/visium.c
===================================================================
--- gcc/config/visium/visium.c	2019-08-20 09:53:06.650416026 +0100
+++ gcc/config/visium/visium.c	2019-09-10 17:22:54.090353853 +0100
@@ -3589,7 +3589,7 @@ visium_save_reg_p (int interrupt, int re
 	  if (df_regs_ever_live_p (regno))
 	    return 1;
 	}
-      else if (call_used_regs[regno])
+      else if (call_used_or_fixed_reg_p (regno))
 	return 1;
 
       /* To save mdb requires two temporary registers.  To save mdc or
@@ -3616,7 +3616,7 @@ visium_save_reg_p (int interrupt, int re
 	}
     }
 
-  return df_regs_ever_live_p (regno) && !call_used_regs[regno];
+  return df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno);
 }
 
 /* Compute the frame size required by the function.  This function is called
Index: gcc/config/xtensa/xtensa.c
===================================================================
--- gcc/config/xtensa/xtensa.c	2019-08-20 09:53:27.554263904 +0100
+++ gcc/config/xtensa/xtensa.c	2019-09-10 17:22:54.090353853 +0100
@@ -2686,7 +2686,7 @@ xtensa_call_save_reg(int regno)
   if (crtl->calls_eh_return && regno >= 2 && regno < 4)
     return true;
 
-  return !fixed_regs[regno] && !call_used_regs[regno] &&
+  return !fixed_regs[regno] && !call_used_or_fixed_reg_p (regno) &&
     df_regs_ever_live_p (regno);
 }
 
Index: gcc/cselib.c
===================================================================
--- gcc/cselib.c	2019-09-09 18:58:51.468270740 +0100
+++ gcc/cselib.c	2019-09-10 17:22:54.090353853 +0100
@@ -2766,7 +2766,7 @@ cselib_process_insn (rtx_insn *insn)
   if (CALL_P (insn))
     {
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-	if (call_used_regs[i]
+	if (call_used_or_fixed_reg_p (i)
 	    || (REG_VALUES (i) && REG_VALUES (i)->elt
 		&& (targetm.hard_regno_call_part_clobbered
 		    (insn, i, GET_MODE (REG_VALUES (i)->elt->val_rtx)))))
Index: gcc/df-scan.c
===================================================================
--- gcc/df-scan.c	2019-09-09 19:01:48.423021426 +0100
+++ gcc/df-scan.c	2019-09-10 17:22:54.090353853 +0100
@@ -3500,7 +3500,7 @@ df_get_entry_block_def_set (bitmap entry
       /* Defs for the callee saved registers are inserted so that the
 	 pushes have some defining location.  */
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-	if ((call_used_regs[i] == 0) && (df_regs_ever_live_p (i)))
+	if ((call_used_or_fixed_reg_p (i) == 0) && (df_regs_ever_live_p (i)))
 	  bitmap_set_bit (entry_block_defs, i);
     }
 
Index: gcc/function.c
===================================================================
--- gcc/function.c	2019-09-09 18:58:51.468270740 +0100
+++ gcc/function.c	2019-09-10 17:22:54.094353828 +0100
@@ -2122,7 +2122,7 @@ aggregate_value_p (const_tree exp, const
   regno = REGNO (reg);
   nregs = hard_regno_nregs (regno, TYPE_MODE (type));
   for (i = 0; i < nregs; i++)
-    if (! call_used_regs[regno + i])
+    if (! call_used_or_fixed_reg_p (regno + i))
       return 1;
 
   return 0;
Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c	2019-03-08 18:15:26.816777919 +0000
+++ gcc/haifa-sched.c	2019-09-10 17:22:54.094353828 +0100
@@ -7207,7 +7207,7 @@ alloc_global_sched_pressure_data (void)
 	  fixed_regs_num[cl] = 0;
 
 	  for (int i = 0; i < ira_class_hard_regs_num[cl]; ++i)
-	    if (!call_used_regs[ira_class_hard_regs[cl][i]])
+	    if (!call_used_or_fixed_reg_p (ira_class_hard_regs[cl][i]))
 	      ++call_saved_regs_num[cl];
 	    else if (fixed_regs[ira_class_hard_regs[cl][i]])
 	      ++fixed_regs_num[cl];
Index: gcc/ira-lives.c
===================================================================
--- gcc/ira-lives.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/ira-lives.c	2019-09-10 17:22:54.094353828 +0100
@@ -1380,7 +1380,7 @@ process_bb_node_lives (ira_loop_tree_nod
 	  if (!cfun->has_nonlocal_label
 	      && has_abnormal_call_or_eh_pred_edge_p (bb))
 	    for (px = 0; px < FIRST_PSEUDO_REGISTER; px++)
-	      if (call_used_regs[px]
+	      if (call_used_or_fixed_reg_p (px)
 #ifdef REAL_PIC_OFFSET_TABLE_REGNUM
 		  /* We should create a conflict of PIC pseudo with
 		     PIC hard reg as PIC hard reg can have a wrong
Index: gcc/ira.c
===================================================================
--- gcc/ira.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/ira.c	2019-09-10 17:22:54.094353828 +0100
@@ -5589,7 +5589,9 @@ do_reload (void)
       poly_int64 size = get_frame_size () + STACK_CHECK_FIXED_FRAME_SIZE;
 
       for (int i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-	if (df_regs_ever_live_p (i) && !fixed_regs[i] && call_used_regs[i])
+	if (df_regs_ever_live_p (i)
+	    && !fixed_regs[i]
+	    && call_used_or_fixed_reg_p (i))
 	  size += UNITS_PER_WORD;
 
       if (constant_lower_bound (size) > STACK_CHECK_MAX_FRAME_SIZE)
Index: gcc/lra-lives.c
===================================================================
--- gcc/lra-lives.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/lra-lives.c	2019-09-10 17:22:54.094353828 +0100
@@ -1106,7 +1106,7 @@ process_bb_lives (basic_block bb, int &c
       if (!cfun->has_nonlocal_label
 	  && has_abnormal_call_or_eh_pred_edge_p (bb))
 	for (px = 0; HARD_REGISTER_NUM_P (px); px++)
-	  if (call_used_regs[px]
+	  if (call_used_or_fixed_reg_p (px)
 #ifdef REAL_PIC_OFFSET_TABLE_REGNUM
 	      /* We should create a conflict of PIC pseudo with PIC
 		 hard reg as PIC hard reg can have a wrong value after
Index: gcc/lra-remat.c
===================================================================
--- gcc/lra-remat.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/lra-remat.c	2019-09-10 17:22:54.094353828 +0100
@@ -1309,7 +1309,7 @@ lra_remat (void)
   all_cands.create (8000);
   call_used_regs_arr_len = 0;
   for (int i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-    if (call_used_regs[i])
+    if (call_used_or_fixed_reg_p (i))
       call_used_regs_arr[call_used_regs_arr_len++] = i;
   initiate_cand_table ();
   create_remat_bb_data ();
Index: gcc/lra.c
===================================================================
--- gcc/lra.c	2019-09-09 18:59:01.404200583 +0100
+++ gcc/lra.c	2019-09-10 17:22:54.094353828 +0100
@@ -2420,7 +2420,7 @@ lra (FILE *f)
 
   if (crtl->saves_all_registers)
     for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-      if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
+      if (!call_used_or_fixed_reg_p (i) && !fixed_regs[i] && !LOCAL_REGNO (i))
 	df_set_regs_ever_live (i, true);
 
   /* We don't DF from now and avoid its using because it is to
Index: gcc/postreload.c
===================================================================
--- gcc/postreload.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/postreload.c	2019-09-10 17:22:54.094353828 +0100
@@ -1135,7 +1135,7 @@ reload_combine_recognize_pattern (rtx_in
 	      if (TEST_HARD_REG_BIT (reg_class_contents[INDEX_REG_CLASS], i)
 		  && reg_state[i].use_index == RELOAD_COMBINE_MAX_USES
 		  && reg_state[i].store_ruid <= reg_state[regno].use_ruid
-		  && (call_used_regs[i] || df_regs_ever_live_p (i))
+		  && (call_used_or_fixed_reg_p (i) || df_regs_ever_live_p (i))
 		  && (!frame_pointer_needed || i != HARD_FRAME_POINTER_REGNUM)
 		  && !fixed_regs[i] && !global_regs[i]
 		  && hard_regno_nregs (i, GET_MODE (reg)) == 1
@@ -2126,7 +2126,7 @@ reload_cse_move2add (rtx_insn *first)
 	{
 	  for (i = FIRST_PSEUDO_REGISTER - 1; i >= 0; i--)
 	    {
-	      if (call_used_regs[i])
+	      if (call_used_or_fixed_reg_p (i))
 		/* Reset the information about this register.  */
 		reg_mode[i] = VOIDmode;
 	    }
Index: gcc/recog.c
===================================================================
--- gcc/recog.c	2019-03-08 18:15:26.872777706 +0000
+++ gcc/recog.c	2019-09-10 17:22:54.098353799 +0100
@@ -3227,7 +3227,8 @@ peep2_find_free_register (int from, int
 	      break;
 	    }
 	  /* And that we don't create an extra save/restore.  */
-	  if (! call_used_regs[regno + j] && ! df_regs_ever_live_p (regno + j))
+	  if (! call_used_or_fixed_reg_p (regno + j)
+	      && ! df_regs_ever_live_p (regno + j))
 	    {
 	      success = 0;
 	      break;
Index: gcc/regrename.c
===================================================================
--- gcc/regrename.c	2019-09-10 17:22:44.698419188 +0100
+++ gcc/regrename.c	2019-09-10 17:22:54.098353799 +0100
@@ -322,7 +322,7 @@ check_new_reg_p (int reg ATTRIBUTE_UNUSE
 	|| global_regs[new_reg + i]
 	/* Can't use regs which aren't saved by the prologue.  */
 	|| (! df_regs_ever_live_p (new_reg + i)
-	    && ! call_used_regs[new_reg + i])
+	    && ! call_used_or_fixed_reg_p (new_reg + i))
 #ifdef LEAF_REGISTERS
 	/* We can't use a non-leaf register if we're in a
 	   leaf function.  */
Index: gcc/reload.c
===================================================================
--- gcc/reload.c	2019-03-08 18:14:26.505007190 +0000
+++ gcc/reload.c	2019-09-10 17:22:54.098353799 +0100
@@ -6911,14 +6911,14 @@ find_equiv_reg (rtx goal, rtx_insn *insn
 
 	  if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
 	    for (i = 0; i < nregs; ++i)
-	      if (call_used_regs[regno + i]
+	      if (call_used_or_fixed_reg_p (regno + i)
 		  || targetm.hard_regno_call_part_clobbered (NULL, regno + i,
 							     mode))
 		return 0;
 
 	  if (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER)
 	    for (i = 0; i < valuenregs; ++i)
-	      if (call_used_regs[valueno + i]
+	      if (call_used_or_fixed_reg_p (valueno + i)
 		  || targetm.hard_regno_call_part_clobbered (NULL, valueno + i,
 							     mode))
 		return 0;
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c	2019-09-10 17:22:44.702419160 +0100
+++ gcc/reload1.c	2019-09-10 17:22:54.098353799 +0100
@@ -795,7 +795,9 @@ reload (rtx_insn *first, int global)
 
   if (crtl->saves_all_registers)
     for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-      if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
+      if (! call_used_or_fixed_reg_p (i)
+	  && ! fixed_regs[i]
+	  && ! LOCAL_REGNO (i))
 	df_set_regs_ever_live (i, true);
 
   /* Find all the pseudo registers that didn't get hard regs
@@ -1906,8 +1908,8 @@ find_reg (class insn_chain *chain, int o
 		  && (inv_reg_alloc_order[regno]
 		      < inv_reg_alloc_order[best_reg])
 #else
-		  && call_used_regs[regno]
-		  && ! call_used_regs[best_reg]
+		  && call_used_or_fixed_reg_p (regno)
+		  && ! call_used_or_fixed_reg_p (best_reg)
 #endif
 		  ))
 	    {
Index: gcc/sel-sched.c
===================================================================
--- gcc/sel-sched.c	2019-09-10 17:22:44.702419160 +0100
+++ gcc/sel-sched.c	2019-09-10 17:22:54.098353799 +0100
@@ -1123,7 +1123,7 @@ init_hard_regs_data (void)
 
   CLEAR_HARD_REG_SET (sel_hrd.regs_ever_used);
   for (cur_reg = 0; cur_reg < FIRST_PSEUDO_REGISTER; cur_reg++)
-    if (df_regs_ever_live_p (cur_reg) || call_used_regs[cur_reg])
+    if (df_regs_ever_live_p (cur_reg) || call_used_or_fixed_reg_p (cur_reg))
       SET_HARD_REG_BIT (sel_hrd.regs_ever_used, cur_reg);
 
   /* Initialize registers that are valid based on mode when this is
