]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
local-alloc.c (update_equiv_regs): When substituting sole definition into sole use...
authorBernd Schmidt <bernd.schmidt@analog.com>
Thu, 2 Jun 2005 08:55:01 +0000 (08:55 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 2 Jun 2005 08:55:01 +0000 (08:55 +0000)
* local-alloc.c (update_equiv_regs): When substituting sole definition
into sole use of a reg, delete it from liveness information.

From-SVN: r100483

gcc/ChangeLog
gcc/local-alloc.c

index 9891a770fd687b4c0fd17deda9dfed7efda623f2..b33675159f4e4476c4c031d81fc5f4dbcc99a5a3 100644 (file)
@@ -2,6 +2,8 @@
 
        * reload1.c (reload): Undo 2005-04-20 change.  Make sure we detect
        the correct set of init_insns that need deletion.
+       * local-alloc.c (update_equiv_regs): When substituting sole definition
+       into sole use of a reg, delete it from liveness information.
 
 2005-06-02  Kaz Kojima  <kkojima@gcc.gnu.org>
 
index 1cbc489e668ac1f49d147cba7c80ca3b30a5c5e2..017530830cb42b8ab0b36d1a3117534b062452bb 100644 (file)
@@ -991,7 +991,7 @@ update_equiv_regs (void)
 
   /* Now scan all regs killed in an insn to see if any of them are
      registers only used that once.  If so, see if we can replace the
-     reference with the equivalent from.  If we can, delete the
+     reference with the equivalent form.  If we can, delete the
      initializing reference and this register will go away.  If we
      can't replace the reference, and the initializing reference is
      within the same loop (or in an inner loop), then move the register
@@ -1077,6 +1077,11 @@ update_equiv_regs (void)
 
                      reg_equiv[regno].init_insns
                        = XEXP (reg_equiv[regno].init_insns, 1);
+
+                     /* Remember to clear REGNO from all basic block's live
+                        info.  */
+                     SET_REGNO_REG_SET (&cleared_regs, regno);
+                     clear_regnos++;
                    }
                  /* Move the initialization of the register to just before
                     INSN.  Update the flow information.  */