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/config | |
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/config')
-rw-r--r-- | gcc/config/bfin/bfin.c | 14 | ||||
-rw-r--r-- | gcc/config/c6x/c6x.c | 42 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 16 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 6 | ||||
-rw-r--r-- | gcc/config/mep/mep.c | 36 | ||||
-rw-r--r-- | gcc/config/picochip/picochip.c | 22 | ||||
-rw-r--r-- | gcc/config/tilegx/tilegx.c | 14 | ||||
-rw-r--r-- | gcc/config/tilepro/tilepro.c | 14 |
8 files changed, 82 insertions, 82 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 35bbace..5800ad5 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -4058,10 +4058,10 @@ reorder_var_tracking_notes (void) while (queue) { rtx next_queue = PREV_INSN (queue); - PREV_INSN (NEXT_INSN (insn)) = queue; - NEXT_INSN (queue) = NEXT_INSN (insn); - NEXT_INSN (insn) = queue; - PREV_INSN (queue) = insn; + SET_PREV_INSN (NEXT_INSN (insn)) = queue; + SET_NEXT_INSN (queue) = NEXT_INSN (insn); + SET_NEXT_INSN (insn) = queue; + SET_PREV_INSN (queue) = insn; queue = next_queue; } in_bundle = false; @@ -4074,10 +4074,10 @@ reorder_var_tracking_notes (void) if (in_bundle) { rtx prev = PREV_INSN (insn); - PREV_INSN (next) = prev; - NEXT_INSN (prev) = next; + SET_PREV_INSN (next) = prev; + SET_NEXT_INSN (prev) = next; - PREV_INSN (insn) = queue; + SET_PREV_INSN (insn) = queue; queue = insn; } } diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 90241ea..889031a 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -4599,7 +4599,7 @@ gen_one_bundle (rtx *slot, int n_filled, int real_first) bundle = make_insn_raw (bundle); BLOCK_FOR_INSN (bundle) = BLOCK_FOR_INSN (slot[0]); INSN_LOCATION (bundle) = INSN_LOCATION (slot[0]); - PREV_INSN (bundle) = PREV_INSN (slot[real_first]); + SET_PREV_INSN (bundle) = SET_PREV_INSN (slot[real_first]); t = NULL_RTX; @@ -4607,18 +4607,18 @@ gen_one_bundle (rtx *slot, int n_filled, int real_first) { rtx insn = slot[i]; remove_insn (insn); - PREV_INSN (insn) = t ? t : PREV_INSN (bundle); + SET_PREV_INSN (insn) = t ? t : PREV_INSN (bundle); if (t != NULL_RTX) - NEXT_INSN (t) = insn; + SET_NEXT_INSN (t) = insn; t = insn; if (i > 0) INSN_LOCATION (slot[i]) = INSN_LOCATION (bundle); } - NEXT_INSN (bundle) = NEXT_INSN (PREV_INSN (bundle)); - NEXT_INSN (t) = NEXT_INSN (bundle); - NEXT_INSN (PREV_INSN (bundle)) = bundle; - PREV_INSN (NEXT_INSN (bundle)) = bundle; + SET_NEXT_INSN (bundle) = NEXT_INSN (PREV_INSN (bundle)); + SET_NEXT_INSN (t) = NEXT_INSN (bundle); + SET_NEXT_INSN (PREV_INSN (bundle)) = bundle; + SET_PREV_INSN (NEXT_INSN (bundle)) = bundle; } /* Move all parallel instructions into SEQUENCEs, so that no subsequent passes @@ -4710,12 +4710,12 @@ c6x_gen_bundles (void) continue; if (NEXT_INSN (last_call) == insn) continue; - NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); - PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); - PREV_INSN (insn) = last_call; - NEXT_INSN (insn) = NEXT_INSN (last_call); - PREV_INSN (NEXT_INSN (insn)) = insn; - NEXT_INSN (PREV_INSN (insn)) = insn; + SET_NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); + SET_PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); + SET_PREV_INSN (insn) = last_call; + SET_NEXT_INSN (insn) = NEXT_INSN (last_call); + SET_PREV_INSN (NEXT_INSN (insn)) = insn; + SET_NEXT_INSN (PREV_INSN (insn)) = insn; last_call = insn; } } @@ -5698,8 +5698,8 @@ hwloop_optimize (hwloop_info loop) reservations of the instructions contained in it to the corresponding instructions from iteration 0, which are the only ones we'll keep. */ assign_reservations (BB_HEAD (bb), ss.last_scheduled_insn); - PREV_INSN (BB_END (bb)) = ss.last_scheduled_iter0; - NEXT_INSN (ss.last_scheduled_iter0) = BB_END (bb); + SET_PREV_INSN (BB_END (bb)) = ss.last_scheduled_iter0; + SET_NEXT_INSN (ss.last_scheduled_iter0) = BB_END (bb); filter_insns_above (bb, sploop_max_uid_iter0); for (i = 0; i < n_real_insns; i++) @@ -5821,13 +5821,13 @@ hwloop_optimize (hwloop_info loop) for (i = 1; i < n_insns; i++) { - NEXT_INSN (orig_vec[i - 1]) = orig_vec[i]; - PREV_INSN (orig_vec[i]) = orig_vec[i - 1]; + SET_NEXT_INSN (orig_vec[i - 1]) = orig_vec[i]; + SET_PREV_INSN (orig_vec[i]) = orig_vec[i - 1]; } - PREV_INSN (orig_vec[0]) = PREV_INSN (BB_HEAD (bb)); - NEXT_INSN (PREV_INSN (BB_HEAD (bb))) = orig_vec[0]; - NEXT_INSN (orig_vec[n_insns - 1]) = NEXT_INSN (BB_END (bb)); - PREV_INSN (NEXT_INSN (BB_END (bb))) = orig_vec[n_insns - 1]; + SET_PREV_INSN (orig_vec[0]) = PREV_INSN (BB_HEAD (bb)); + SET_NEXT_INSN (PREV_INSN (BB_HEAD (bb))) = orig_vec[0]; + SET_NEXT_INSN (orig_vec[n_insns - 1]) = NEXT_INSN (BB_END (bb)); + SET_PREV_INSN (NEXT_INSN (BB_END (bb))) = orig_vec[n_insns - 1]; SET_BB_HEAD (bb) = orig_vec[0]; SET_BB_END (bb) = orig_vec[n_insns - 1]; undo_splits: diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index d282ef2..1ed8f74 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -1465,12 +1465,12 @@ frv_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) if (NEXT_INSN (last_call) == insn) continue; - NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); - PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); - PREV_INSN (insn) = last_call; - NEXT_INSN (insn) = NEXT_INSN (last_call); - PREV_INSN (NEXT_INSN (insn)) = insn; - NEXT_INSN (PREV_INSN (insn)) = insn; + SET_NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); + SET_PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); + SET_PREV_INSN (insn) = last_call; + SET_NEXT_INSN (insn) = NEXT_INSN (last_call); + SET_PREV_INSN (NEXT_INSN (insn)) = insn; + SET_NEXT_INSN (PREV_INSN (insn)) = insn; last_call = insn; } } @@ -8162,8 +8162,8 @@ static void frv_register_nop (rtx nop) { nop = make_insn_raw (nop); - NEXT_INSN (nop) = 0; - PREV_INSN (nop) = 0; + SET_NEXT_INSN (nop) = 0; + SET_PREV_INSN (nop) = 0; frv_nops[frv_num_nops++] = nop; } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index ae22bea..1b2146d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -9489,10 +9489,10 @@ ia64_init_dfa_pre_cycle_insn (void) prev_cycle_state = xmalloc (dfa_state_size); } dfa_pre_cycle_insn = make_insn_raw (gen_pre_cycle ()); - PREV_INSN (dfa_pre_cycle_insn) = NEXT_INSN (dfa_pre_cycle_insn) = NULL_RTX; + SET_PREV_INSN (dfa_pre_cycle_insn) = SET_NEXT_INSN (dfa_pre_cycle_insn) = NULL_RTX; recog_memoized (dfa_pre_cycle_insn); dfa_stop_insn = make_insn_raw (gen_insn_group_barrier (GEN_INT (3))); - PREV_INSN (dfa_stop_insn) = NEXT_INSN (dfa_stop_insn) = NULL_RTX; + SET_PREV_INSN (dfa_stop_insn) = SET_NEXT_INSN (dfa_stop_insn) = NULL_RTX; recog_memoized (dfa_stop_insn); } @@ -9679,7 +9679,7 @@ ia64_reorg (void) initiate_bundle_states (); ia64_nop = make_insn_raw (gen_nop ()); - PREV_INSN (ia64_nop) = NEXT_INSN (ia64_nop) = NULL_RTX; + SET_PREV_INSN (ia64_nop) = SET_NEXT_INSN (ia64_nop) = NULL_RTX; recog_memoized (ia64_nop); clocks_length = get_max_uid () + 1; stops_p = XCNEWVEC (char, clocks_length); diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index dadd92b..abd8e5c 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -5695,9 +5695,9 @@ mep_reorg_addcombine (rtx insns) && ic + nc > -32768) { XEXP (SET_SRC (PATTERN (i)), 1) = GEN_INT (ic + nc); - NEXT_INSN (i) = NEXT_INSN (n); + SET_NEXT_INSN (i) = NEXT_INSN (n); if (NEXT_INSN (i)) - PREV_INSN (NEXT_INSN (i)) = i; + SET_PREV_INSN (NEXT_INSN (i)) = i; } } } @@ -6812,10 +6812,10 @@ mep_make_bundle (rtx core, rtx cop) remove_insn (cop); /* Set up the links of the insns inside the SEQUENCE. */ - PREV_INSN (core) = PREV_INSN (insn); - NEXT_INSN (core) = cop; - PREV_INSN (cop) = core; - NEXT_INSN (cop) = NEXT_INSN (insn); + SET_PREV_INSN (core) = PREV_INSN (insn); + SET_NEXT_INSN (core) = cop; + SET_PREV_INSN (cop) = core; + SET_NEXT_INSN (cop) = NEXT_INSN (insn); /* Set the VLIW flag for the coprocessor instruction. */ PUT_MODE (core, VOIDmode); @@ -6933,13 +6933,13 @@ mep_bundle_insns (rtx insns) if (NOTE_P (note)) { /* Remove NOTE from here... */ - PREV_INSN (NEXT_INSN (note)) = PREV_INSN (note); - NEXT_INSN (PREV_INSN (note)) = NEXT_INSN (note); + SET_PREV_INSN (NEXT_INSN (note)) = PREV_INSN (note); + SET_NEXT_INSN (PREV_INSN (note)) = NEXT_INSN (note); /* ...and put it in here. */ - NEXT_INSN (note) = first; - PREV_INSN (note) = PREV_INSN (first); - NEXT_INSN (PREV_INSN (note)) = note; - PREV_INSN (NEXT_INSN (note)) = note; + SET_NEXT_INSN (note) = first; + SET_PREV_INSN (note) = PREV_INSN (first); + SET_NEXT_INSN (PREV_INSN (note)) = note; + SET_PREV_INSN (NEXT_INSN (note)) = note; } note = prev; @@ -7001,17 +7001,17 @@ mep_bundle_insns (rtx insns) /* Remove core insn. */ if (PREV_INSN (core_insn)) - NEXT_INSN (PREV_INSN (core_insn)) = NEXT_INSN (core_insn); + SET_NEXT_INSN (PREV_INSN (core_insn)) = NEXT_INSN (core_insn); if (NEXT_INSN (core_insn)) - PREV_INSN (NEXT_INSN (core_insn)) = PREV_INSN (core_insn); + SET_PREV_INSN (NEXT_INSN (core_insn)) = PREV_INSN (core_insn); /* Re-insert core insn. */ - PREV_INSN (core_insn) = PREV_INSN (insn); - NEXT_INSN (core_insn) = insn; + SET_PREV_INSN (core_insn) = PREV_INSN (insn); + SET_NEXT_INSN (core_insn) = insn; if (PREV_INSN (core_insn)) - NEXT_INSN (PREV_INSN (core_insn)) = core_insn; - PREV_INSN (insn) = core_insn; + SET_NEXT_INSN (PREV_INSN (core_insn)) = core_insn; + SET_PREV_INSN (insn) = core_insn; PUT_MODE (core_insn, TImode); PUT_MODE (insn, VOIDmode); diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index 6433acb..1894fadf 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -3199,10 +3199,10 @@ reorder_var_tracking_notes (void) while (queue) { rtx next_queue = PREV_INSN (queue); - PREV_INSN (NEXT_INSN(insn)) = queue; - NEXT_INSN(queue) = NEXT_INSN(insn); - PREV_INSN(queue) = insn; - NEXT_INSN(insn) = queue; + SET_PREV_INSN (NEXT_INSN(insn)) = queue; + SET_NEXT_INSN(queue) = NEXT_INSN(insn); + SET_PREV_INSN(queue) = insn; + SET_NEXT_INSN(insn) = queue; queue = next_queue; } /* There is no more to do for this bb. break*/ @@ -3216,10 +3216,10 @@ reorder_var_tracking_notes (void) while (queue) { rtx next_queue = PREV_INSN (queue); - NEXT_INSN (PREV_INSN(insn)) = queue; - PREV_INSN (queue) = PREV_INSN(insn); - PREV_INSN (insn) = queue; - NEXT_INSN (queue) = insn; + SET_NEXT_INSN (PREV_INSN(insn)) = queue; + SET_PREV_INSN (queue) = PREV_INSN(insn); + SET_PREV_INSN (insn) = queue; + SET_NEXT_INSN (queue) = insn; queue = next_queue; } } @@ -3227,15 +3227,15 @@ reorder_var_tracking_notes (void) else if (NOTE_P (insn)) { rtx prev = PREV_INSN (insn); - PREV_INSN (next) = prev; - NEXT_INSN (prev) = next; + SET_PREV_INSN (next) = prev; + SET_NEXT_INSN (prev) = next; /* Ignore call_arg notes. They are expected to be just after the call insn. If the call is start of a long VLIW, labels are emitted in the middle of a VLIW, which our assembler can not handle. */ if (NOTE_KIND (insn) != NOTE_INSN_CALL_ARG_LOCATION) { - PREV_INSN (insn) = queue; + SET_PREV_INSN (insn) = queue; queue = insn; } } diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c index 69c9be4..ebdcb7b 100644 --- a/gcc/config/tilegx/tilegx.c +++ b/gcc/config/tilegx/tilegx.c @@ -4827,10 +4827,10 @@ reorder_var_tracking_notes (void) while (queue) { rtx next_queue = PREV_INSN (queue); - PREV_INSN (NEXT_INSN (insn)) = queue; - NEXT_INSN (queue) = NEXT_INSN (insn); - NEXT_INSN (insn) = queue; - PREV_INSN (queue) = insn; + SET_PREV_INSN (NEXT_INSN (insn)) = queue; + SET_NEXT_INSN (queue) = NEXT_INSN (insn); + SET_NEXT_INSN (insn) = queue; + SET_PREV_INSN (queue) = insn; queue = next_queue; } in_bundle = false; @@ -4843,10 +4843,10 @@ reorder_var_tracking_notes (void) if (in_bundle) { rtx prev = PREV_INSN (insn); - PREV_INSN (next) = prev; - NEXT_INSN (prev) = next; + SET_PREV_INSN (next) = prev; + SET_NEXT_INSN (prev) = next; - PREV_INSN (insn) = queue; + SET_PREV_INSN (insn) = queue; queue = insn; } } diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index d36c065..c27aca9 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -4283,10 +4283,10 @@ reorder_var_tracking_notes (void) while (queue) { rtx next_queue = PREV_INSN (queue); - PREV_INSN (NEXT_INSN (insn)) = queue; - NEXT_INSN (queue) = NEXT_INSN (insn); - NEXT_INSN (insn) = queue; - PREV_INSN (queue) = insn; + SET_PREV_INSN (NEXT_INSN (insn)) = queue; + SET_NEXT_INSN (queue) = NEXT_INSN (insn); + SET_NEXT_INSN (insn) = queue; + SET_PREV_INSN (queue) = insn; queue = next_queue; } in_bundle = false; @@ -4299,10 +4299,10 @@ reorder_var_tracking_notes (void) if (in_bundle) { rtx prev = PREV_INSN (insn); - PREV_INSN (next) = prev; - NEXT_INSN (prev) = next; + SET_PREV_INSN (next) = prev; + SET_NEXT_INSN (prev) = next; - PREV_INSN (insn) = queue; + SET_PREV_INSN (insn) = queue; queue = insn; } } |