diff options
author | Mike Stump <mrs@wrs.com> | 1998-01-28 19:21:54 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-01-28 12:21:54 -0700 |
commit | 21ca87b81b0961895d21faae45fa2e25d59f7dc0 (patch) | |
tree | b2042a4ce6e394e73a57cc2e67809b45c06b8701 /gcc/rtlanal.c | |
parent | d2c92f5a43a4541115e0b8eadf024ed7004e1386 (diff) | |
download | gcc-21ca87b81b0961895d21faae45fa2e25d59f7dc0.zip gcc-21ca87b81b0961895d21faae45fa2e25d59f7dc0.tar.gz gcc-21ca87b81b0961895d21faae45fa2e25d59f7dc0.tar.bz2 |
rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after reload completes.
* rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after
reload completes.
* genattrtab.c (reload_completed): Define.
* m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Remove obsolete
comments.
From-SVN: r17542
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index bff2b6e..efb70ea 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1157,19 +1157,30 @@ dead_or_set_regno_p (insn, test_regno) 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)) + /* 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 + ) { - if (REG_NOTE_KIND (link) != REG_DEAD || GET_CODE (XEXP (link, 0)) != REG) - continue; + /* 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)))); + 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 (test_regno >= regno && test_regno < endregno) + return 1; + } } if (GET_CODE (insn) == CALL_INSN |