From 30d2ef86a977ef7dd7472eec447be218bce286a4 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Thu, 22 Sep 2016 13:16:23 +0000 Subject: [PATCH] make next/prev nondebug_insn take rtx_insn * gcc/ChangeLog: 2016-09-22 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to rtx_insn *. (prev_nondebug_insn): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * rtl.h: Adjust prototype. * cfgloop.h: Likewise. From-SVN: r240358 --- gcc/ChangeLog | 9 +++++++++ gcc/cfgloop.h | 2 +- gcc/emit-rtl.c | 8 ++------ gcc/loop-doloop.c | 2 +- gcc/rtl.h | 4 ++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index deca9dc12ce..7d11126673b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2016-09-22 Trevor Saunders + + * emit-rtl.c (next_nondebug_insn): Change argument type to + rtx_insn *. + (prev_nondebug_insn): Likewise. + * loop-doloop.c (doloop_condition_get): Likewise. + * rtl.h: Adjust prototype. + * cfgloop.h: Likewise. + 2016-09-22 Trevor Saunders * emit-rtl.c (next_nonnote_insn): Change argument type to diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 5c202eb1256..0448a61dc5c 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -371,7 +371,7 @@ extern bool just_once_each_iteration_p (const struct loop *, const_basic_block); gcov_type expected_loop_iterations_unbounded (const struct loop *, bool *read_profile_p = NULL); extern unsigned expected_loop_iterations (struct loop *); -extern rtx doloop_condition_get (rtx); +extern rtx doloop_condition_get (rtx_insn *); void mark_loop_for_removal (loop_p); diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 49907d10781..c24717b9048 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3373,10 +3373,8 @@ prev_nonnote_insn_bb (rtx uncast_insn) routine does not look inside SEQUENCEs. */ rtx_insn * -next_nondebug_insn (rtx uncast_insn) +next_nondebug_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); - while (insn) { insn = NEXT_INSN (insn); @@ -3391,10 +3389,8 @@ next_nondebug_insn (rtx uncast_insn) This routine does not look inside SEQUENCEs. */ rtx_insn * -prev_nondebug_insn (rtx uncast_insn) +prev_nondebug_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); - while (insn) { insn = PREV_INSN (insn); diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index c31151630ec..17a968fe6ab 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -70,7 +70,7 @@ along with GCC; see the file COPYING3. If not see if it is not a decrement and branch jump insn. */ rtx -doloop_condition_get (rtx doloop_pat) +doloop_condition_get (rtx_insn *doloop_pat) { rtx cmp; rtx inc; diff --git a/gcc/rtl.h b/gcc/rtl.h index 0d121bcefee..b557ffe3fd6 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2838,8 +2838,8 @@ extern rtx_insn *prev_nonnote_insn (rtx_insn *); extern rtx_insn *prev_nonnote_insn_bb (rtx); extern rtx_insn *next_nonnote_insn (rtx_insn *); extern rtx_insn *next_nonnote_insn_bb (rtx_insn *); -extern rtx_insn *prev_nondebug_insn (rtx); -extern rtx_insn *next_nondebug_insn (rtx); +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); -- 2.30.2