summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 10:29:46 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 10:29:46 +0000
commit3790d8bf03f35e78591fc54e816494f986ba6401 (patch)
tree6ff7052031154102376b390324e2dce95c511d77
parent9cad95b7bb07c036af33deb02c260426ab43f78a (diff)
downloadgcc-3790d8bf03f35e78591fc54e816494f986ba6401.tar.gz
* regrename.c (do_replace): Don't update notes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175203 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/regrename.c32
2 files changed, 4 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c971faf5c76..89c5f65c372 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-20 Bernd Schmidt <bernds@codesourcery.com>
+
+ * regrename.c (do_replace): Don't update notes.
+
2011-06-20 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (create_TOC_reference): Wrap high part
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 77e23f8c2ab..f313d084ee3 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -432,7 +432,6 @@ do_replace (struct du_head *head, int reg)
{
struct du_chain *chain;
unsigned int base_regno = head->regno;
- bool found_note = false;
gcc_assert (! DEBUG_INSN_P (head->first->insn));
@@ -446,46 +445,15 @@ do_replace (struct du_head *head, int reg)
INSN_VAR_LOCATION_LOC (chain->insn) = gen_rtx_UNKNOWN_VAR_LOC ();
else
{
- rtx note;
-
*chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno;
REG_ATTRS (*chain->loc) = attr;
REG_POINTER (*chain->loc) = reg_ptr;
-
- for (note = REG_NOTES (chain->insn); note; note = XEXP (note, 1))
- {
- enum reg_note kind = REG_NOTE_KIND (note);
- if (kind == REG_DEAD || kind == REG_UNUSED)
- {
- rtx reg = XEXP (note, 0);
- gcc_assert (HARD_REGISTER_P (reg));
-
- if (REGNO (reg) == base_regno)
- {
- found_note = true;
- if (kind == REG_DEAD
- && reg_set_p (*chain->loc, chain->insn))
- remove_note (chain->insn, note);
- else
- XEXP (note, 0) = *chain->loc;
- break;
- }
- }
- }
}
df_insn_rescan (chain->insn);
}
- if (!found_note)
- {
- /* If the chain's first insn is the same as the last, we should have
- found a REG_UNUSED note. */
- gcc_assert (head->first->insn != head->last->insn);
- if (!reg_set_p (*head->last->loc, head->last->insn))
- add_reg_note (head->last->insn, REG_DEAD, *head->last->loc);
- }
}