diff options
author | Bernd Schmidt <bernds@redhat.com> | 2016-11-07 17:03:55 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2016-11-07 17:03:55 +0000 |
commit | 1581a12c3577a2d9048d47b0b7205df772c308db (patch) | |
tree | e4c649d63cdbc46e4c05389eea601fa29f22b40a /gcc/rtlanal.c | |
parent | caa024ffce186dc6ce7ee8217d5d50d7f9a091e0 (diff) | |
download | gcc-1581a12c3577a2d9048d47b0b7205df772c308db.zip gcc-1581a12c3577a2d9048d47b0b7205df772c308db.tar.gz gcc-1581a12c3577a2d9048d47b0b7205df772c308db.tar.bz2 |
emit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order.
* emit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order.
* sel-sched-ir.c (create_copy_of_insn_rtx): Likewise.
* rtl.h (duplicate_reg_notes): Declare.
* rtlanal.c (duplicate_reg_note): New function.
From-SVN: r241913
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index c98a708..4d7aad0 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -2304,6 +2304,20 @@ add_shallow_copy_of_reg_note (rtx_insn *insn, rtx note) add_reg_note (insn, REG_NOTE_KIND (note), XEXP (note, 0)); } +/* Duplicate NOTE and return the copy. */ +rtx +duplicate_reg_note (rtx note) +{ + reg_note kind = REG_NOTE_KIND (note); + + if (GET_CODE (note) == INT_LIST) + return gen_rtx_INT_LIST ((machine_mode) kind, XINT (note, 0), NULL_RTX); + else if (GET_CODE (note) == EXPR_LIST) + return alloc_reg_note (kind, copy_insn_1 (XEXP (note, 0)), NULL_RTX); + else + return alloc_reg_note (kind, XEXP (note, 0), NULL_RTX); +} + /* Remove register note NOTE from the REG_NOTES of INSN. */ void |