diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2007-02-20 22:14:41 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2007-02-20 22:14:41 +0000 |
commit | 7cd689bcf045c55b1786cdbc84c9f63a07070a58 (patch) | |
tree | 86910b46650f770e82274e25d7d3f2c992409256 /gcc/rtlanal.c | |
parent | ea8f106d4c4e16933ef9bbd8bbd5a8588cd6c53f (diff) | |
download | gcc-7cd689bcf045c55b1786cdbc84c9f63a07070a58.zip gcc-7cd689bcf045c55b1786cdbc84c9f63a07070a58.tar.gz gcc-7cd689bcf045c55b1786cdbc84c9f63a07070a58.tar.bz2 |
rtl.h (remove_reg_equal_equiv_notes): New prototype.
* 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.
From-SVN: r122178
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index b23eec4..00a996e 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 = ®_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. */ |