This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to make find_last_value more flexible
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch to make find_last_value more flexible
- From: John Wehle <john at feith dot com>
- Date: Mon, 17 Jan 2000 17:51:03 -0500 (EST)
This patch allows find_last_value to skip checking to see if the
object has been modified.
ChangeLog:
Sun Jan 16 21:48:30 EST 2000 John Wehle (john@feith.com)
* rtlanal.c (find_last_value): Allow NULL_RTX for valid_to.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/rtlanal.c.ORIGINAL Sun Jan 9 00:50:47 2000
--- gcc/rtlanal.c Sun Jan 16 21:32:00 2000
*************** multiple_sets (insn)
*** 744,754 ****
return 0;
}
! /* 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. */
rtx
find_last_value (x, pinsn, valid_to, allow_hwreg)
--- 744,755 ----
return 0;
}
! /* 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)
*************** find_last_value (x, pinsn, valid_to, all
*** 773,779 ****
if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
src = XEXP (note, 0);
! if (! 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
--- 774,781 ----
if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
src = XEXP (note, 0);
! 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
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------