summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-20 22:14:41 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-20 22:14:41 +0000
commitf16feee25a739555a76f0cd97aca0b2f8f267aa3 (patch)
tree86910b46650f770e82274e25d7d3f2c992409256 /gcc/rtlanal.c
parente4f51d19ea7e0a169e7efbce63cc8c62e71851bb (diff)
downloadgcc-f16feee25a739555a76f0cd97aca0b2f8f267aa3.tar.gz
* rtl.h (remove_reg_equal_equiv_notes): New prototype.
* rtlanal.c (remove_reg_equal_equiv_notes): New function. * combine.c (adjust_for_new_dest): Use it. * postreload.c (reload_combine): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122178 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index b23eec4cf9f..00a996e4696 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1820,6 +1820,24 @@ remove_note (rtx insn, rtx note)
gcc_unreachable ();
}
+/* Remove REG_EQUAL and/or REG_EQUIV notes if INSN has such notes. */
+
+void
+remove_reg_equal_equiv_notes (rtx insn)
+{
+ rtx *loc;
+
+ loc = &REG_NOTES (insn);
+ while (*loc)
+ {
+ enum reg_note kind = REG_NOTE_KIND (*loc);
+ if (kind == REG_EQUAL || kind == REG_EQUIV)
+ *loc = XEXP (*loc, 1);
+ else
+ loc = &XEXP (*loc, 1);
+ }
+}
+
/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
return 1 if it is found. A simple equality test is used to determine if
NODE matches. */