diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-19 00:54:22 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-19 00:54:22 +0000 |
commit | 0f82e5c9fb49a2618233fcaca6db40fe856e66c1 (patch) | |
tree | 03e829aeeea83ad9c7386f8e4821c145e377edbe /gcc/emit-rtl.c | |
parent | 9c9afb6905bfc13e8ba14474fed4b476b0e7f837 (diff) | |
download | gcc-0f82e5c9fb49a2618233fcaca6db40fe856e66c1.zip gcc-0f82e5c9fb49a2618233fcaca6db40fe856e66c1.tar.gz gcc-0f82e5c9fb49a2618233fcaca6db40fe856e66c1.tar.bz2 |
Split NEXT_INSN/PREV_INSN into lvalue and rvalue forms
/
2014-08-19 David Malcolm <dmalcolm@redhat.com>
* rtx-classes-status.txt: Add SET_NEXT_INSN, SET_PREV_INSN.
gcc/
2014-08-19 David Malcolm <dmalcolm@redhat.com>
* rtl.h (PREV_INSN): Split macro in two: the existing one,
for rvalues, and...
(SET_PREV_INSN): New macro, for use as an lvalue.
(NEXT_INSN, SET_NEXT_INSN): Likewise.
* caller-save.c (save_call_clobbered_regs): Convert lvalue use of
PREV_INSN/NEXT_INSN into SET_PREV_INSN/SET_NEXT_INSN.
* cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
(fixup_abnormal_edges): Likewise.
(unlink_insn_chain): Likewise.
(fixup_reorder_chain): Likewise.
(cfg_layout_delete_block): Likewise.
(cfg_layout_merge_blocks): Likewise.
* combine.c (update_cfg_for_uncondjump): Likewise.
* emit-rtl.c (link_insn_into_chain): Likewise.
(remove_insn): Likewise.
(delete_insns_since): Likewise.
(reorder_insns_nobb): Likewise.
(emit_insn_after_1): Likewise.
* final.c (rest_of_clean_state): Likewise.
(final_scan_insn): Likewise.
* gcse.c (can_assign_to_reg_without_clobbers_p): Likewise.
* haifa-sched.c (concat_note_lists): Likewise.
(remove_notes): Likewise.
(restore_other_notes): Likewise.
(move_insn): Likewise.
(unlink_bb_notes): Likewise.
(restore_bb_notes): Likewise.
* jump.c (delete_for_peephole): Likewise.
* optabs.c (emit_libcall_block_1): Likewise.
* reorg.c (emit_delay_sequence): Likewise.
(fill_simple_delay_slots): Likewise.
* sel-sched-ir.c (sel_move_insn): Likewise.
(sel_remove_insn): Likewise.
(get_bb_note_from_pool): Likewise.
* sel-sched.c (move_nop_to_previous_block): Likewise.
* config/bfin/bfin.c (reorder_var_tracking_notes): Likewise.
* config/c6x/c6x.c (gen_one_bundle): Likewise.
(c6x_gen_bundles): Likewise.
(hwloop_optimize): Likewise.
* config/frv/frv.c (frv_function_prologue): Likewise.
(frv_register_nop): Likewise.
* config/ia64/ia64.c (ia64_init_dfa_pre_cycle_insn): Likewise.
(ia64_reorg): Likewise.
* config/mep/mep.c (mep_reorg_addcombine): Likewise.
(mep_make_bundle): Likewise.
(mep_bundle_insns): Likewise.
* config/picochip/picochip.c (reorder_var_tracking_notes): Likewise.
* config/tilegx/tilegx.c (reorder_var_tracking_notes): Likewise.
* config/tilepro/tilepro.c (reorder_var_tracking_notes): Likewise.
From-SVN: r214128
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 56aad90..0b537d0 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3874,29 +3874,29 @@ make_note_raw (enum insn_note subtype) static inline void link_insn_into_chain (rtx insn, rtx prev, rtx next) { - PREV_INSN (insn) = prev; - NEXT_INSN (insn) = next; + SET_PREV_INSN (insn) = prev; + SET_NEXT_INSN (insn) = next; if (prev != NULL) { - NEXT_INSN (prev) = insn; + SET_NEXT_INSN (prev) = insn; if (NONJUMP_INSN_P (prev) && GET_CODE (PATTERN (prev)) == SEQUENCE) { rtx sequence = PATTERN (prev); - NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = insn; + SET_NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = insn; } } if (next != NULL) { - PREV_INSN (next) = insn; + SET_PREV_INSN (next) = insn; if (NONJUMP_INSN_P (next) && GET_CODE (PATTERN (next)) == SEQUENCE) - PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = insn; + SET_PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = insn; } if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) { rtx sequence = PATTERN (insn); - PREV_INSN (XVECEXP (sequence, 0, 0)) = prev; - NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = next; + SET_PREV_INSN (XVECEXP (sequence, 0, 0)) = prev; + SET_NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = next; } } @@ -4068,17 +4068,17 @@ remove_insn (rtx insn) if (prev) { - NEXT_INSN (prev) = next; + SET_NEXT_INSN (prev) = next; if (NONJUMP_INSN_P (prev) && GET_CODE (PATTERN (prev)) == SEQUENCE) { rtx sequence = PATTERN (prev); - NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = next; + SET_NEXT_INSN (XVECEXP (sequence, 0, XVECLEN (sequence, 0) - 1)) = next; } } else if (get_insns () == insn) { if (next) - PREV_INSN (next) = NULL; + SET_PREV_INSN (next) = NULL; set_first_insn (next); } else @@ -4097,9 +4097,9 @@ remove_insn (rtx insn) if (next) { - PREV_INSN (next) = prev; + SET_PREV_INSN (next) = prev; if (NONJUMP_INSN_P (next) && GET_CODE (PATTERN (next)) == SEQUENCE) - PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = prev; + SET_PREV_INSN (XVECEXP (PATTERN (next), 0, 0)) = prev; } else if (get_last_insn () == insn) set_last_insn (prev); @@ -4165,7 +4165,7 @@ delete_insns_since (rtx from) if (from == 0) set_first_insn (0); else - NEXT_INSN (from) = 0; + SET_NEXT_INSN (from) = 0; set_last_insn (from); } @@ -4191,9 +4191,9 @@ reorder_insns_nobb (rtx from, rtx to, rtx after) /* Splice this bunch out of where it is now. */ if (PREV_INSN (from)) - NEXT_INSN (PREV_INSN (from)) = NEXT_INSN (to); + SET_NEXT_INSN (PREV_INSN (from)) = NEXT_INSN (to); if (NEXT_INSN (to)) - PREV_INSN (NEXT_INSN (to)) = PREV_INSN (from); + SET_PREV_INSN (NEXT_INSN (to)) = PREV_INSN (from); if (get_last_insn () == to) set_last_insn (PREV_INSN (from)); if (get_insns () == from) @@ -4201,11 +4201,11 @@ reorder_insns_nobb (rtx from, rtx to, rtx after) /* Make the new neighbors point to it and it to them. */ if (NEXT_INSN (after)) - PREV_INSN (NEXT_INSN (after)) = to; + SET_PREV_INSN (NEXT_INSN (after)) = to; - NEXT_INSN (to) = NEXT_INSN (after); - PREV_INSN (from) = after; - NEXT_INSN (after) = from; + SET_NEXT_INSN (to) = NEXT_INSN (after); + SET_PREV_INSN (from) = after; + SET_NEXT_INSN (after) = from; if (after == get_last_insn ()) set_last_insn (to); } @@ -4410,11 +4410,11 @@ emit_insn_after_1 (rtx first, rtx after, basic_block bb) after_after = NEXT_INSN (after); - NEXT_INSN (after) = first; - PREV_INSN (first) = after; - NEXT_INSN (last) = after_after; + SET_NEXT_INSN (after) = first; + SET_PREV_INSN (first) = after; + SET_NEXT_INSN (last) = after_after; if (after_after) - PREV_INSN (after_after) = last; + SET_PREV_INSN (after_after) = last; if (after == get_last_insn ()) set_last_insn (last); |