* rtlanal.c (find_last_value): Allow NULL_RTX for valid_to.
authorJohn Wehle <john@feith.com>
Sat, 26 Feb 2000 02:58:08 +0000 (02:58 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 26 Feb 2000 02:58:08 +0000 (19:58 -0700)
From-SVN: r32163

gcc/ChangeLog
gcc/rtlanal.c

index 0823934d1d4847b29d73c95817eaabe98a6f6b99..9edbc2ac3c913113dd4918b16a266830ee162374 100644 (file)
@@ -1,3 +1,7 @@
+2000-02-25  John Wehle  (john@feith.com)
+
+       * rtlanal.c (find_last_value): Allow NULL_RTX for valid_to.
+
 2000-02-25  Anthony Green  <green@cygnus.com>
 
        * toplev.c (rest_of_compilation): Rebuild jump labels if
index 24ca8d1b53021ee503a0160dd4d03f8a9d4f994d..a1d42a6349ee331ba6b9c5e75e55a53e5aab59d7 100644 (file)
@@ -750,11 +750,12 @@ multiple_sets (insn)
   return 0;
 }
 \f
-/* Return the last thing that X was assigned from before *PINSN.  Verify that
-   the object is not modified up to VALID_TO.  If it was, if we hit
-   a partial assignment to X, or hit a CODE_LABEL first, return X.  If we
-   found an assignment, update *PINSN to point to it.  
-   ALLOW_HWREG is set to 1 if hardware registers are allowed to be the src.  */
+/* Return the last thing that X was assigned from before *PINSN.  If VALID_TO
+   is not NULL_RTX then verify that the object is not modified up to VALID_TO.
+   If the object was modified, if we hit a partial assignment to X, or hit a
+   CODE_LABEL first, return X.  If we found an assignment, update *PINSN to
+   point to it.  ALLOW_HWREG is set to 1 if hardware registers are allowed to
+   be the src.  */
 
 rtx
 find_last_value (x, pinsn, valid_to, allow_hwreg)
@@ -779,7 +780,8 @@ find_last_value (x, pinsn, valid_to, allow_hwreg)
            if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
              src = XEXP (note, 0);
 
-           if (! modified_between_p (src, PREV_INSN (p), valid_to)
+           if ((valid_to == NULL_RTX
+                || ! modified_between_p (src, PREV_INSN (p), valid_to))
                /* Reject hard registers because we don't usually want
                   to use them; we'd rather use a pseudo.  */
                && (! (GET_CODE (src) == REG