scheduling problems again
Mike Stump
mrs@wrs.com
Wed Jan 28 15:03:00 GMT 1998
> To: mrs@wrs.com (Mike Stump)
> cc: egcs@cygnus.com
> Date: Wed, 28 Jan 1998 00:05:22 -0700
> From: Jeffrey A Law <law@hurl.cygnus.com>
> I'd just change it to ignore REG_DEAD notes after reload instead of
> aborting. There's still cases where it would be useful if it
> ignored such notes.
Oops, my last patch was incomplete and not as optimal as it could be,
try this instead:
The genattrtab.c patch is so that genattrtab can link. It doesn't
actually use dead_or_set_p currently (I checked), but if in the future
it does, the semantics will be that the REG_DEAD notes (if any are
found) are reliable. That seemed like a reasonable default.
1998-01-28 Mike Stump <mrs@wrs.com>
* rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after
reload completes, as REG_DEAD notes are not maintained after
reload completes and may be inaccurate.
* genattrtab.c (reload_completed): Define so that if
dead_or_set_p is ever called, REG_DEAD notes are treated as
valid.
Doing diffs in genattrtab.c.~1~:
*** genattrtab.c.~1~ Mon Jan 19 12:21:17 1998
--- genattrtab.c Wed Jan 28 10:32:33 1998
*************** static rtx true_rtx, false_rtx;
*** 348,353 ****
--- 348,358 ----
static char *alternative_name;
+ /* Indicate that REG_DEAD notes are valid if dead_or_set_p is ever
+ called. */
+
+ int reload_completed = 0;
+
/* Simplify an expression. Only call the routine if there is something to
simplify. */
#define SIMPLIFY_TEST_EXP(EXP,INSN_CODE,INSN_INDEX) \
--------------
Doing diffs in rtlanal.c.~1~:
*** rtlanal.c.~1~ Thu Jan 15 17:20:49 1998
--- rtlanal.c Wed Jan 28 10:23:32 1998
*************** dead_or_set_regno_p (insn, test_regno)
*** 1157,1175 ****
int regno, endregno;
rtx link;
! /* See if there is a death note for something that includes TEST_REGNO. */
! for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
{
! if (REG_NOTE_KIND (link) != REG_DEAD || GET_CODE (XEXP (link, 0)) != REG)
! continue;
! regno = REGNO (XEXP (link, 0));
! endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
! : regno + HARD_REGNO_NREGS (regno,
! GET_MODE (XEXP (link, 0))));
! if (test_regno >= regno && test_regno < endregno)
! return 1;
}
if (GET_CODE (insn) == CALL_INSN
--- 1157,1186 ----
int regno, endregno;
rtx link;
! /* REG_READ notes are not normally maintained after reload, so we
! ignore them if the are invalid. */
! if (! reload_completed
! #ifdef PRESERVE_DEATH_INFO_REGNO_P
! || PRESERVE_DEATH_INFO_REGNO_P (test_regno)
! #endif
! )
{
! /* See if there is a death note for something that includes
! TEST_REGNO. */
! for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
! {
! if (REG_NOTE_KIND (link) != REG_DEAD
! || GET_CODE (XEXP (link, 0)) != REG)
! continue;
! regno = REGNO (XEXP (link, 0));
! endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
! : regno + HARD_REGNO_NREGS (regno,
! GET_MODE (XEXP (link, 0))));
! if (test_regno >= regno && test_regno < endregno)
! return 1;
! }
}
if (GET_CODE (insn) == CALL_INSN
--------------
More information about the Gcc
mailing list