diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-02-13 20:43:13 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-02-13 15:43:13 -0500 |
commit | d9c695fff183dd61b20b19160b2743d9a9286ce3 (patch) | |
tree | 1db29b09e26f9b5b55426aa24f11a97d2d706d8c /gcc/rtlanal.c | |
parent | 848e0190fb94ea253031af77f52842117522f79b (diff) | |
download | gcc-d9c695fff183dd61b20b19160b2743d9a9286ce3.tar.gz |
rtlanal.c (find_reg_equal_equiv_note): New function.
* rtlanal.c (find_reg_equal_equiv_note): New function.
* simplify-rtx.c (simplify_gen_unary, simplify_gen_ternary): New fns.
(simplify_gen_relational, simplify_replace_rtx): Likewise.
* rtl.h: Add declarations for above functions.
From-SVN: r39644
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index a738acb28a5..0eefa70da52 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1485,6 +1485,23 @@ find_regno_note (insn, kind, regno) return 0; } +/* Return a REG_EQUIV or REG_EQUAL note if insn has only a single set and + has such a note. */ + +rtx +find_reg_equal_equiv_note (insn) + rtx insn; +{ + rtx note; + + if (single_set (insn) == 0) + return 0; + else if ((note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != 0) + return note; + else + return find_reg_note (insn, REG_EQUAL, NULL_RTX); +} + /* Return true if DATUM, or any overlap of DATUM, of kind CODE is found in the CALL_INSN_FUNCTION_USAGE information of INSN. */ |