diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-28 19:21:54 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-28 19:21:54 +0000 |
commit | 08b06814e7546642829466dc31603f18bd79d33b (patch) | |
tree | b2042a4ce6e394e73a57cc2e67809b45c06b8701 /gcc/rtlanal.c | |
parent | 50cbc1eff0e8a180c1463e219b09c25b30023023 (diff) | |
download | gcc-08b06814e7546642829466dc31603f18bd79d33b.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17542 138bc75d-0d04-0410-961f-82ee72b054a4
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 bff2b6ea2e8..efb70ea6130 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 |