diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-18 10:23:22 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-18 10:23:22 +0000 |
commit | 0680da650a36b1b2245bc8d92876dbd243bd311c (patch) | |
tree | 82a1fb5a01a533049b83b6416d9b5e4eef768913 /gcc/df-problems.c | |
parent | 028d5ac7ffe7bae46aedabc679074b4c80f45df8 (diff) | |
download | gcc-0680da650a36b1b2245bc8d92876dbd243bd311c.tar.gz |
2012-10-18 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 192552 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@192557 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r-- | gcc/df-problems.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c index b4df2ba2a14..3f9228dc53a 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -2822,13 +2822,10 @@ df_ignore_stack_reg (int regno ATTRIBUTE_UNUSED) #endif -/* Remove all of the REG_DEAD or REG_UNUSED notes from INSN and add - them to OLD_DEAD_NOTES and OLD_UNUSED_NOTES. Remove also - REG_EQUAL/REG_EQUIV notes referring to dead pseudos using LIVE - as the bitmap of currently live registers. */ +/* Remove all of the REG_DEAD or REG_UNUSED notes from INSN. */ static void -df_kill_notes (rtx insn, bitmap live) +df_remove_dead_and_unused_notes (rtx insn) { rtx *pprev = ®_NOTES (insn); rtx link = *pprev; @@ -2873,6 +2870,27 @@ df_kill_notes (rtx insn, bitmap live) } break; + default: + pprev = &XEXP (link, 1); + link = *pprev; + break; + } + } +} + +/* Remove REG_EQUAL/REG_EQUIV notes referring to dead pseudos using LIVE + as the bitmap of currently live registers. */ + +static void +df_remove_dead_eq_notes (rtx insn, bitmap live) +{ + rtx *pprev = ®_NOTES (insn); + rtx link = *pprev; + + while (link) + { + switch (REG_NOTE_KIND (link)) + { case REG_EQUAL: case REG_EQUIV: { @@ -2913,6 +2931,7 @@ df_kill_notes (rtx insn, bitmap live) } break; } + default: pprev = &XEXP (link, 1); link = *pprev; @@ -2921,7 +2940,6 @@ df_kill_notes (rtx insn, bitmap live) } } - /* Set a NOTE_TYPE note for REG in INSN. */ static inline void @@ -3195,7 +3213,7 @@ df_note_bb_compute (unsigned int bb_index, debug_insn = DEBUG_INSN_P (insn); bitmap_clear (do_not_gen); - df_kill_notes (insn, live); + df_remove_dead_and_unused_notes (insn); /* Process the defs. */ if (CALL_P (insn)) @@ -3336,6 +3354,8 @@ df_note_bb_compute (unsigned int bb_index, } } + df_remove_dead_eq_notes (insn, live); + if (debug_insn == -1) { /* ??? We could probably do better here, replacing dead |