diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-28 18:59:13 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-28 18:59:13 +0000 |
commit | e6eda746185997c7c42ee8691761cb7c3c7d0ce1 (patch) | |
tree | 505bd8408677649e55caaf6edf746f1bd1cfe859 /gcc/config/c6x | |
parent | f8f0516ef64cf62bdbba30cee5055685c6f9b68a (diff) | |
download | gcc-e6eda746185997c7c42ee8691761cb7c3c7d0ce1.zip gcc-e6eda746185997c7c42ee8691761cb7c3c7d0ce1.tar.gz gcc-e6eda746185997c7c42ee8691761cb7c3c7d0ce1.tar.bz2 |
Make SET_NEXT_INSN/SET_PREV_INSN require an rtx_insn
gcc/
2014-08-28 David Malcolm <dmalcolm@redhat.com>
* rtl.h (SET_PREV_INSN): Strengthen param from rtx to rtx_insn *.
(SET_NEXT_INSN): Likewise.
(gen_rtvec_v): Add an overload for param types (int, rtx_insn **).
* config/c6x/c6x.c (gen_one_bundle): Strengthen param "slot" from
rtx * to rtx_insn **. Introduce a new local rtx "seq", using it
to split out the SEQUENCE from local "bundle", strengthening the
latter from rtx to rtx_insn * to hold the insn holding the SEQUENCE.
Strengthen locals "t" and "insn" from rtx to rtx_insn *.
(c6x_gen_bundles): Strengthen locals "insn", "next", "last_call"
and the type of the elements of the "slot" array from rtx to
rtx_insn *.
(reorg_split_calls): Likewise for locals "insn" and "next", and
the type of the elements of the "slot" array.
* config/frv/frv.c (frv_nops): Likewise for the elements of this
array.
(frv_function_prologue): Likewise for locals "insn", "next",
"last_call".
(frv_register_nop): Introduce a local "nop_insn" to be the
rtx_insn * containing rtx "nop".
* config/mep/mep.c (mep_make_bundle): Param "core" is sometimes
used as an insn and sometimes as a pattern, so rename it to
"core_insn_or_pat", and introduce local rtx_insn * "core_insn",
using it where dealing with the core insn.
* config/picochip/picochip.c (reorder_var_tracking_notes):
Strengthen locals "insn", "next", "last_insn", "queue",
"next_queue", "prev" from rtx to rtx_insn *.
* emit-rtl.c (gen_rtvec_v): Add overloaded implementation for when
the second param is an rtx_insn ** rather than an rtx **.
(link_insn_into_chain): Strengthen locals "seq" and "sequence"
from rtx to rtx_sequence *, and introduce local named "sequence",
using methods of rtx_sequence to clarify the code.
(remove_insn): Introduce local rtx_sequence * named "sequence" and
use its methods.
(emit_insn_after_1): Strengthen return type from rtx to rtx_insn *.
Rename param "after" to "uncast_after", reintroducing "after" as a
local rtx_insn * with a checked cast.
(emit_pattern_after_noloc): Rename param "after" to "uncast_after",
reintroducing "after" as a local rtx_insn * with a checked cast.
Strengthen local "last" from rtx to rtx_insn * and remove the
now-redundant checked casts.
(copy_delay_slot_insn): Strengthen return type and param from rtx
to rtx_insn *.
* haifa-sched.c (reemit_notes): Strengthen params "insn" and
"last" from rtx to rtx_insn *.
From-SVN: r214685
Diffstat (limited to 'gcc/config/c6x')
-rw-r--r-- | gcc/config/c6x/c6x.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 8422756..9ed41ef 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -4591,23 +4591,24 @@ c6x_adjust_cost (rtx_insn *insn, rtx link, rtx_insn *dep_insn, int cost) first in the original stream. */ static void -gen_one_bundle (rtx *slot, int n_filled, int real_first) +gen_one_bundle (rtx_insn **slot, int n_filled, int real_first) { - rtx bundle; - rtx t; + rtx seq; + rtx_insn *bundle; + rtx_insn *t; int i; - bundle = gen_rtx_SEQUENCE (VOIDmode, gen_rtvec_v (n_filled, slot)); - bundle = make_insn_raw (bundle); + seq = gen_rtx_SEQUENCE (VOIDmode, gen_rtvec_v (n_filled, slot)); + bundle = make_insn_raw (seq); BLOCK_FOR_INSN (bundle) = BLOCK_FOR_INSN (slot[0]); INSN_LOCATION (bundle) = INSN_LOCATION (slot[0]); SET_PREV_INSN (bundle) = SET_PREV_INSN (slot[real_first]); - t = NULL_RTX; + t = NULL; for (i = 0; i < n_filled; i++) { - rtx insn = slot[i]; + rtx_insn *insn = slot[i]; remove_insn (insn); SET_PREV_INSN (insn) = t ? t : PREV_INSN (bundle); if (t != NULL_RTX) @@ -4630,14 +4631,14 @@ static void c6x_gen_bundles (void) { basic_block bb; - rtx insn, next, last_call; + rtx_insn *insn, *next, *last_call; FOR_EACH_BB_FN (bb, cfun) { - rtx insn, next; + rtx_insn *insn, *next; /* The machine is eight insns wide. We can have up to six shadow insns, plus an extra slot for merging the jump shadow. */ - rtx slot[15]; + rtx_insn *slot[15]; int n_filled = 0; int first_slot = 0; @@ -4700,7 +4701,7 @@ c6x_gen_bundles (void) /* Bundling, and emitting nops, can separate NOTE_INSN_CALL_ARG_LOCATION from the corresponding calls. Fix that up here. */ - last_call = NULL_RTX; + last_call = NULL; for (insn = get_insns (); insn; insn = next) { next = NEXT_INSN (insn); @@ -4855,13 +4856,13 @@ static void reorg_split_calls (rtx *call_labels) { unsigned int reservation_mask = 0; - rtx insn = get_insns (); + rtx_insn *insn = get_insns (); gcc_assert (NOTE_P (insn)); insn = next_real_insn (insn); while (insn) { int uid; - rtx next = next_real_insn (insn); + rtx_insn *next = next_real_insn (insn); if (DEBUG_INSN_P (insn)) goto done; @@ -4886,7 +4887,7 @@ reorg_split_calls (rtx *call_labels) else { rtx t; - rtx slot[4]; + rtx_insn *slot[4]; emit_label_after (label, insn); /* Bundle the call and its delay slots into a single |