]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport a change to the 2.95 branch
authorBernd Schmidt <bernds@redhat.co.uk>
Thu, 30 Nov 2000 12:23:12 +0000 (12:23 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 30 Nov 2000 12:23:12 +0000 (12:23 +0000)
From-SVN: r37886

gcc/ChangeLog
gcc/reload1.c

index 52ae16e8b57cb9dba107aa8fc2ee47a67ff2287a..16dde7299e9e5b59d986212a0f3014583a20686d 100644 (file)
@@ -1,5 +1,11 @@
 2000-11-30  Bernd Schmidt  <bernds@redhat.co.uk>
 
+       2000-01-12  Bernd Schmidt  <bernds@redhat.co.uk>
+       * reload1.c (reload_reg_unavailable): New static variable.
+       (reload_reg_free_p): Test it.
+       (reload_reg_free_for_value_p): Test it instead of reload_reg_used.
+       (choose_reload_regs_init): Compute it.
+
        Thu Jul  6 18:30:36 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
        * reload.c (push_reload): When seeing if can reuse a register,
        check extra registers against widest of INMODE and OUTMODE.
index c57670663fe66fd42e180216db6519fd6feea06c..b49d9925551f4405ca27029cd067a00996ed7bfb 100644 (file)
@@ -4580,6 +4580,8 @@ reload_reg_class_lower (r1p, r2p)
 /* The following HARD_REG_SETs indicate when each hard register is
    used for a reload of various parts of the current insn.  */
 
+/* If reg is unavailable for all reloads.  */
+static HARD_REG_SET reload_reg_unavailable;
 /* If reg is in use as a reload reg for a RELOAD_OTHER reload.  */
 static HARD_REG_SET reload_reg_used;
 /* If reg is in use for a RELOAD_FOR_INPUT_ADDRESS reload for operand I.  */
@@ -4802,8 +4804,8 @@ reload_reg_free_p (regno, opnum, type)
 {
   int i;
 
-  /* In use for a RELOAD_OTHER means it's not available for anything.  */
-  if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+  if (TEST_HARD_REG_BIT (reload_reg_used, regno)
+      || TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
     return 0;
 
   switch (type)
@@ -5211,7 +5213,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum,
      available as spill registers, including hard registers that are
      earlyclobbered in asms.  As a temporary measure, reject anything
      in reload_reg_used.  */
-  if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+  if (TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
     return 0;
 
   if (out == const0_rtx)
@@ -5673,7 +5675,7 @@ choose_reload_regs (chain)
       CLEAR_HARD_REG_SET (reload_reg_used_in_outaddr_addr[i]);
     }
 
-  IOR_COMPL_HARD_REG_SET (reload_reg_used, chain->used_spill_regs);
+  COMPL_HARD_REG_SET (reload_reg_unavailable, chain->used_spill_regs);
   
 #if 0  /* Not needed, now that we can always retry without inheritance.  */
   /* See if we have more mandatory reloads than spill regs.