From 4ce524a1c10399a70883806968dd225cfde8e238 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 29 Aug 2014 00:17:58 +0000 Subject: [PATCH] Make next_insn and previous_insn require an rtx_insn * gcc/ 2014-08-28 David Malcolm * rtl.h (previous_insn): Strengthen param from rtx to rtx_insn *. (next_insn): Likewise. * emit-rtl.c (next_insn): Likewise. (previous_insn): Likewise. * config/pa/pa.c (remove_useless_addtr_insns): Strenghten locals "insn" and "next" from rtx to rtx_insn *. * config/picochip/picochip.c (picochip_reorg): Likewise for locals "insn", "insn1", "vliw_start", "prologue_end_note", "last_insn_in_packet". From-SVN: r214708 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/pa/pa.c | 5 +++-- gcc/config/picochip/picochip.c | 6 +++--- gcc/emit-rtl.c | 6 ++---- gcc/rtl.h | 4 ++-- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83b959a4bcb..2095abfc1bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2014-08-28 David Malcolm + + * rtl.h (previous_insn): Strengthen param from rtx to rtx_insn *. + (next_insn): Likewise. + * emit-rtl.c (next_insn): Likewise. + (previous_insn): Likewise. + * config/pa/pa.c (remove_useless_addtr_insns): Strenghten locals + "insn" and "next" from rtx to rtx_insn *. + * config/picochip/picochip.c (picochip_reorg): Likewise for locals + "insn", "insn1", "vliw_start", "prologue_end_note", + "last_insn_in_packet". + 2014-08-28 David Malcolm * shrink-wrap.h (active_insn_between): Strengthen both params from diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index fe76bd4be3b..0ae6bd32033 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -3296,7 +3296,7 @@ pa_output_ascii (FILE *file, const char *p, int size) static void remove_useless_addtr_insns (int check_notes) { - rtx insn; + rtx_insn *insn; static int pass = 0; /* This is fairly cheap, so always run it when optimizing. */ @@ -3348,7 +3348,8 @@ remove_useless_addtr_insns (int check_notes) reverse the comparison & the branch to avoid add,tr insns. */ for (insn = get_insns (); insn; insn = next_insn (insn)) { - rtx tmp, next; + rtx tmp; + rtx_insn *next; /* Ignore anything that isn't an INSN. */ if (! NONJUMP_INSN_P (insn)) diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index fbcb63ff050..3e532f46b0e 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -3249,7 +3249,7 @@ reorder_var_tracking_notes (void) void picochip_reorg (void) { - rtx insn, insn1, vliw_start = NULL_RTX; + rtx_insn *insn, *insn1, *vliw_start = NULL; int vliw_insn_location = 0; /* We are freeing block_for_insn in the toplev to keep compatibility @@ -3326,8 +3326,8 @@ picochip_reorg (void) of VLIW packets. */ if (picochip_schedule_type == DFA_TYPE_SPEED) { - rtx prologue_end_note = NULL; - rtx last_insn_in_packet = NULL; + rtx_insn *prologue_end_note = NULL; + rtx_insn *last_insn_in_packet = NULL; for (insn = get_insns (); insn; insn = next_insn (insn)) { diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 330c5215a2e..c257fbe3381 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3215,9 +3215,8 @@ get_max_insn_count (void) of the sequence. */ rtx_insn * -next_insn (rtx uncast_insn) +next_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); if (insn) { insn = NEXT_INSN (insn); @@ -3233,9 +3232,8 @@ next_insn (rtx uncast_insn) of the sequence. */ rtx_insn * -previous_insn (rtx uncast_insn) +previous_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); if (insn) { insn = PREV_INSN (insn); diff --git a/gcc/rtl.h b/gcc/rtl.h index 1bfb5bc7032..beeed2f9a1e 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2620,8 +2620,8 @@ extern rtx_insn *emit_use (rtx); extern rtx_insn *make_insn_raw (rtx); extern void add_function_usage_to (rtx, rtx); extern rtx_call_insn *last_call_insn (void); -extern rtx_insn *previous_insn (rtx); -extern rtx_insn *next_insn (rtx); +extern rtx_insn *previous_insn (rtx_insn *); +extern rtx_insn *next_insn (rtx_insn *); extern rtx_insn *prev_nonnote_insn (rtx); extern rtx_insn *prev_nonnote_insn_bb (rtx); extern rtx_insn *next_nonnote_insn (rtx); -- 2.30.2