From d8fd56b22635e30177b2849de33b4c6d5ef6c422 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Thu, 22 Sep 2016 13:16:30 +0000 Subject: [PATCH] make prev_real_insn take rtx_insn * gcc/ChangeLog: 2016-09-22 Trevor Saunders * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. * rtl.h: Adjust prototype. * config/sh/sh.md: Adjust. * dwarf2out.c (add_var_loc_to_decl): Likewise. From-SVN: r240359 --- gcc/ChangeLog | 7 +++++++ gcc/config/sh/sh.md | 3 ++- gcc/dwarf2out.c | 2 +- gcc/emit-rtl.c | 4 +--- gcc/rtl.h | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d11126673b..7576a1eea50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-09-22 Trevor Saunders + + * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. + * rtl.h: Adjust prototype. + * config/sh/sh.md: Adjust. + * dwarf2out.c (add_var_loc_to_decl): Likewise. + 2016-09-22 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index edc4d1517a5..25e03efc313 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -7178,7 +7178,8 @@ (label_ref (match_operand 1 "" "")))) (use (label_ref (match_operand 2 "" "")))] "TARGET_SH2 - && (! INSN_UID (operands[1]) || prev_real_insn (operands[1]) == insn)" + && (! INSN_UID (operands[1]) + || prev_real_insn (as_a (operands[1])) == insn)" "braf %0%#" [(set_attr "needs_delay_slot" "yes") (set_attr "type" "jump_ind")]) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4e4893f26a8..e36473a5c52 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -5415,7 +5415,7 @@ add_var_loc_to_decl (tree decl, rtx loc_note, const char *label) && NOTE_VAR_LOCATION_LOC (temp->first->loc) && GET_CODE (NOTE_VAR_LOCATION_LOC (temp->first->loc)) == GET_CODE (DECL_INCOMING_RTL (decl)) - && prev_real_insn (temp->first->loc) == NULL_RTX + && prev_real_insn (as_a (temp->first->loc)) == NULL_RTX && (bitsize != -1 || !rtx_equal_p (NOTE_VAR_LOCATION_LOC (temp->first->loc), NOTE_VAR_LOCATION_LOC (loc_note)) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index c24717b9048..0fc0a670f68 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3461,10 +3461,8 @@ next_real_insn (rtx uncast_insn) SEQUENCEs. */ rtx_insn * -prev_real_insn (rtx uncast_insn) +prev_real_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); - while (insn) { insn = PREV_INSN (insn); diff --git a/gcc/rtl.h b/gcc/rtl.h index b557ffe3fd6..c253fdac64c 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2842,7 +2842,7 @@ extern rtx_insn *prev_nondebug_insn (rtx_insn *); extern rtx_insn *next_nondebug_insn (rtx_insn *); extern rtx_insn *prev_nonnote_nondebug_insn (rtx); extern rtx_insn *next_nonnote_nondebug_insn (rtx); -extern rtx_insn *prev_real_insn (rtx); +extern rtx_insn *prev_real_insn (rtx_insn *); extern rtx_insn *next_real_insn (rtx); extern rtx_insn *prev_active_insn (rtx); extern rtx_insn *next_active_insn (rtx); -- 2.30.2