From 44b4913a82ebdc8d036299364b08e17fe3d44c21 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 8 Jan 2014 17:14:48 -0500
Subject: [PATCH 108/159] FIXME: various concretizations of locals

---
 gcc/builtins.c        |  2 +-
 gcc/cfgbuild.c        |  3 ++-
 gcc/cfgcleanup.c      |  2 +-
 gcc/cfgrtl.c          | 26 +++++++++++++++-----------
 gcc/combine.c         |  2 +-
 gcc/emit-rtl.c        | 12 ++++++------
 gcc/expr.c            |  2 +-
 gcc/function.c        |  2 +-
 gcc/gcse.c            |  4 ++--
 gcc/haifa-sched.c     |  6 +++---
 gcc/ira-lives.c       |  2 +-
 gcc/jump.c            |  4 ++--
 gcc/lra.c             |  4 ++--
 gcc/modulo-sched.c    |  8 ++++----
 gcc/postreload-gcse.c |  2 +-
 gcc/postreload.c      |  2 +-
 gcc/reload1.c         | 16 ++++++++--------
 gcc/reorg.c           | 16 ++++++++--------
 gcc/resource.c        |  2 +-
 gcc/sched-deps.c      |  2 +-
 gcc/sched-ebb.c       |  2 +-
 gcc/store-motion.c    |  4 ++--
 gcc/valtrack.c        |  3 ++-
 gcc/web.c             |  2 +-
 24 files changed, 68 insertions(+), 62 deletions(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index c4ed2ae..2119adc 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4608,7 +4608,7 @@ expand_builtin_trap (void)
 #ifdef HAVE_trap
   if (HAVE_trap)
     {
-      rtx insn = emit_insn (gen_trap ());
+      rtx_base_insn insn = emit_insn (gen_trap ());
       /* For trap insns when not accumulating outgoing args force
 	 REG_ARGS_SIZE note to prevent crossjumping of calls with
 	 different args sizes.  */
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index a747837..a49659b 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -400,7 +400,8 @@ mark_tablejump_edge (rtx label)
 static void
 purge_dead_tablejump_edges (basic_block bb, rtx table)
 {
-  rtx insn = BB_END (bb), tmp;
+  rtx_base_insn insn = BB_END (bb);
+  rtx tmp;
   rtvec vec;
   int j;
   edge_iterator ei;
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 0aac8f5..f5ec23d 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -2590,7 +2590,7 @@ try_head_merge_bb (basic_block bb)
 static bool
 trivially_empty_bb_p (basic_block bb)
 {
-  rtx insn = BB_END (bb);
+  rtx_base_insn insn = BB_END (bb);
 
   while (1)
     {
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index ac18db2..c6c4ec4 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1049,7 +1049,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout)
       /* Selectively unlink whole insn chain.  */
       if (in_cfglayout)
 	{
-	  rtx insn = BB_FOOTER (src);
+	  rtx_base_insn insn = BB_FOOTER (src);
 
 	  delete_insn_chain (kill_from, BB_END (src), false);
 
@@ -1579,9 +1579,10 @@ force_nonfallthru_and_redirect (edge e, basic_block target, rtx jump_label)
 	}
       if (adjust_jump_target)
 	{
-	  rtx insn = BB_END (e->src), note;
-	  rtx old_label = BB_HEAD (e->dest);
-	  rtx new_label = BB_HEAD (target);
+	  rtx_base_insn insn = BB_END (e->src);
+	  rtx note;
+	  rtx_base_insn old_label = BB_HEAD (e->dest);
+	  rtx_base_insn new_label = BB_HEAD (target);
 
 	  if (JUMP_LABEL (insn) == old_label)
 	    {
@@ -1946,7 +1947,9 @@ insert_insn_on_edge (rtx pattern, edge e)
 void
 commit_one_edge_insertion (edge e)
 {
-  rtx before = NULL_RTX, after = NULL_RTX, insns, tmp;
+  rtx_base_insn before = NULL_RTX_BASE_INSN, after = NULL_RTX_BASE_INSN;
+  rtx insns;
+  rtx_base_insn tmp;
   rtx_base_insn last;
   basic_block bb;
 
@@ -2986,7 +2989,8 @@ bool
 purge_dead_edges (basic_block bb)
 {
   edge e;
-  rtx insn = BB_END (bb), note;
+  rtx_base_insn insn = BB_END (bb);
+  rtx note;
   bool purged = false;
   bool found;
   edge_iterator ei;
@@ -4081,7 +4085,7 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb)
   /* Do not duplicate blocks containing insns that can't be copied.  */
   if (targetm.cannot_copy_insn_p)
     {
-      rtx insn = BB_HEAD (bb);
+      rtx_base_insn insn = BB_HEAD (bb);
       while (1)
 	{
 	  if (INSN_P (insn) && targetm.cannot_copy_insn_p (insn))
@@ -4738,7 +4742,7 @@ rtl_split_block_before_cond_jump (basic_block bb)
 static bool
 rtl_block_ends_with_call_p (basic_block bb)
 {
-  rtx insn = BB_END (bb);
+  rtx_base_insn insn = BB_END (bb);
 
   while (!CALL_P (insn)
 	 && insn != BB_HEAD (bb)
@@ -4820,7 +4824,7 @@ rtl_flow_call_edges_add (sbitmap blocks)
   if (check_last_block)
     {
       basic_block bb = EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb;
-      rtx insn = BB_END (bb);
+      rtx_base_insn insn = BB_END (bb);
 
       /* Back up past insns that must be kept in the same block as a call.  */
       while (insn != BB_HEAD (bb)
@@ -4862,7 +4866,7 @@ rtl_flow_call_edges_add (sbitmap blocks)
 	  if (need_fake_edge_p (insn))
 	    {
 	      edge e;
-	      rtx split_at_insn = insn;
+	      rtx_base_insn split_at_insn = insn;
 
 	      /* Don't split the block between a call and an insn that should
 		 remain in the same block as the call.  */
@@ -4918,7 +4922,7 @@ rtl_lv_add_condition_to_bb (basic_block first_head ,
 			    basic_block cond_bb, void *comp_rtx)
 {
   rtx_code_label label;
-  rtx seq, jump;
+  rtx_base_insn seq, jump;
   rtx op0 = XEXP ((rtx)comp_rtx, 0);
   rtx op1 = XEXP ((rtx)comp_rtx, 1);
   enum rtx_code comp = GET_CODE ((rtx)comp_rtx);
diff --git a/gcc/combine.c b/gcc/combine.c
index c6f047b..3345237 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2506,7 +2506,7 @@ try_combine (rtx_base_insn i3, rtx_base_insn i2,
 
       for (i = 0; i < 4; i++)
 	{
-	  rtx insn = i == 0 ? i0 : i == 1 ? i1 : i == 2 ? i2 : i3;
+	  rtx_base_insn insn = i == 0 ? i0 : i == 1 ? i1 : i == 2 ? i2 : i3;
 	  rtx set = single_set (insn);
 	  rtx src;
 	  if (!set)
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 43b5733..6124355 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3491,8 +3491,8 @@ mark_label_nuses (rtx x)
 rtx_base_insn
 try_split (rtx pat, rtx_base_insn trial, int last)
 {
-  rtx before = PREV_INSN (trial);
-  rtx after = NEXT_INSN (trial);
+  rtx_base_insn before = PREV_INSN (trial);
+  rtx_base_insn after = NEXT_INSN (trial);
   int has_barrier = 0;
   rtx note;
   rtx_base_insn seq;
@@ -3837,7 +3837,7 @@ link_insn_into_chain (rtx insn, rtx prev, rtx next)
 void
 add_insn (rtx insn)
 {
-  rtx prev = get_last_insn ();
+  rtx_base_insn prev = get_last_insn ();
   link_insn_into_chain (insn, prev, NULL);
   if (NULL == get_insns ())
     set_first_insn (insn);
@@ -3849,7 +3849,7 @@ add_insn (rtx insn)
 static void
 add_insn_after_nobb (rtx insn, rtx after)
 {
-  rtx next = NEXT_INSN (after);
+  rtx_base_insn next = NEXT_INSN (after);
 
   gcc_assert (!optimize || !INSN_DELETED_P (after));
 
@@ -3878,7 +3878,7 @@ add_insn_after_nobb (rtx insn, rtx after)
 static void
 add_insn_before_nobb (rtx insn, rtx before)
 {
-  rtx prev = PREV_INSN (before);
+  rtx_base_insn prev = PREV_INSN (before);
 
   gcc_assert (!optimize || !INSN_DELETED_P (before));
 
@@ -4146,7 +4146,7 @@ reorder_insns_nobb (rtx from, rtx to, rtx after)
 void
 reorder_insns (rtx from, rtx to, rtx after)
 {
-  rtx prev = PREV_INSN (from);
+  rtx_base_insn prev = PREV_INSN (from);
   basic_block bb, bb2;
 
   reorder_insns_nobb (from, to, after);
diff --git a/gcc/expr.c b/gcc/expr.c
index cc0f6b3..113714e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4089,7 +4089,7 @@ static void
 emit_single_push_insn (enum machine_mode mode, rtx x, tree type)
 {
   int delta, old_delta = stack_pointer_delta;
-  rtx prev = get_last_insn ();
+  rtx_base_insn prev = get_last_insn ();
   rtx last;
 
   emit_single_push_insn_1 (mode, x, type);
diff --git a/gcc/function.c b/gcc/function.c
index 0cdff8c..e555b6f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5654,7 +5654,7 @@ dup_block_and_redirect (basic_block bb, basic_block copy_bb,
 {
   edge_iterator ei;
   edge e;
-  rtx insn = BB_END (bb);
+  rtx_base_insn insn = BB_END (bb);
 
   /* We know BB has a single successor, so there is no need to copy a
      simple jump at the end of BB.  */
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 417daa4..b5b5c03 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2134,7 +2134,7 @@ process_insert_insn (struct expr *expr)
      insn will be recognized (this also adds any needed CLOBBERs).  */
   else
     {
-      rtx insn = emit_insn (gen_rtx_SET (VOIDmode, reg, exp));
+      rtx_base_insn insn = emit_insn (gen_rtx_SET (VOIDmode, reg, exp));
 
       if (insn_invalid_p (insn, false))
 	gcc_unreachable ();
@@ -2559,7 +2559,7 @@ pre_delete (void)
 	/* We only need to search antic_occr since we require ANTLOC != 0.  */
 	for (occr = expr->antic_occr; occr != NULL; occr = occr->next)
 	  {
-	    rtx insn = occr->insn;
+	    rtx_base_insn insn = occr->insn;
 	    rtx set;
 	    basic_block bb = BLOCK_FOR_INSN (insn);
 
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 4705e02..3f3bb70 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -7472,8 +7472,8 @@ static void
 sched_extend_bb (void)
 {
   /* The following is done to keep current_sched_info->next_tail non null.  */
-  rtx end = BB_END (EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb);
-  rtx insn = DEBUG_INSN_P (end) ? prev_nondebug_insn (end) : end;
+  rtx_base_insn end = BB_END (EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb);
+  rtx_base_insn insn = DEBUG_INSN_P (end) ? prev_nondebug_insn (end) : end;
   if (NEXT_INSN (end) == 0
       || (!NOTE_P (insn)
 	  && !LABEL_P (insn)
@@ -8518,7 +8518,7 @@ sched_create_empty_bb_1 (basic_block after)
 rtx
 sched_emit_insn (rtx pat)
 {
-  rtx insn = emit_insn_before (pat, nonscheduled_insns_begin);
+  rtx_base_insn insn = emit_insn_before (pat, nonscheduled_insns_begin);
   haifa_init_insn (insn);
 
   if (current_sched_info->add_remove_insn)
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 1f8256a..ad02dd0 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -1078,7 +1078,7 @@ find_call_crossed_cheap_reg (rtx insn)
     {
       basic_block bb = BLOCK_FOR_INSN (insn);
       rtx reg = SET_SRC (exp);
-      rtx prev = PREV_INSN (insn);
+      rtx_base_insn prev = PREV_INSN (insn);
       while (prev && !(INSN_P (prev)
 		       && BLOCK_FOR_INSN (prev) != bb))
 	{
diff --git a/gcc/jump.c b/gcc/jump.c
index b61c3dd..61b4868 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1400,8 +1400,8 @@ delete_for_peephole (rtx from, rtx to)
 
   while (1)
     {
-      rtx next = NEXT_INSN (insn);
-      rtx prev = PREV_INSN (insn);
+      rtx_base_insn next = NEXT_INSN (insn);
+      rtx_base_insn prev = PREV_INSN (insn);
 
       if (!NOTE_P (insn))
 	{
diff --git a/gcc/lra.c b/gcc/lra.c
index 351d3fa..92eff22 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -230,7 +230,7 @@ lra_set_insn_deleted (rtx insn)
 void
 lra_delete_dead_insn (rtx insn)
 {
-  rtx prev = prev_real_insn (insn);
+  rtx_base_insn prev = prev_real_insn (insn);
   rtx prev_dest;
 
   /* If the previous insn sets a register that dies in our insn,
@@ -1851,7 +1851,7 @@ push_insns (rtx from, rtx to)
 static void
 setup_sp_offset (rtx from, rtx last)
 {
-  rtx before = next_nonnote_insn_bb (last);
+  rtx_base_insn before = next_nonnote_insn_bb (last);
   HOST_WIDE_INT offset = (before == NULL_RTX || ! INSN_P (before)
 			  ? 0 : lra_get_insn_recog_data (before)->sp_offset);
 
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index f313044..b78e6bd 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -1272,7 +1272,7 @@ loop_canon_p (struct loop *loop)
     {
       if (dump_file)
 	{
-	  rtx insn = BB_END (loop->header);
+	  rtx_base_insn insn = BB_END (loop->header);
 
 	  fprintf (dump_file, "SMS loop many exits");
 	  dump_insn_location (insn);
@@ -1285,7 +1285,7 @@ loop_canon_p (struct loop *loop)
     {
       if (dump_file)
 	{
-	  rtx insn = BB_END (loop->header);
+	  rtx_base_insn insn = BB_END (loop->header);
 
 	  fprintf (dump_file, "SMS loop many BBs.");
 	  dump_insn_location (insn);
@@ -1410,7 +1410,7 @@ sms_schedule (void)
 
       if (dump_file)
 	{
-	  rtx insn = BB_END (loop->header);
+	  rtx_base_insn insn = BB_END (loop->header);
 
 	  fprintf (dump_file, "SMS loop num: %d", loop->num);
 	  dump_insn_location (insn);
@@ -1545,7 +1545,7 @@ sms_schedule (void)
 
       if (dump_file)
 	{
-	  rtx insn = BB_END (loop->header);
+	  rtx_base_insn insn = BB_END (loop->header);
 
 	  fprintf (dump_file, "SMS loop num: %d", loop->num);
 	  dump_insn_location (insn);
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 49841c0..65b8bc4 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -443,7 +443,7 @@ dump_expr_hash_table_entry (expr **slot, FILE *file)
   occr = exprs->avail_occr;
   while (occr)
     {
-      rtx insn = occr->insn;
+      rtx_base_insn insn = occr->insn;
       print_rtl_single (file, insn);
       fprintf (file, "\n");
       occr = occr->next;
diff --git a/gcc/postreload.c b/gcc/postreload.c
index a489eba..d8fea0c 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -1134,7 +1134,7 @@ reload_combine_recognize_pattern (rtx_base_insn insn)
       && last_label_ruid < reg_state[regno].use_ruid)
     {
       rtx base = XEXP (src, 1);
-      rtx prev = prev_nonnote_nondebug_insn (insn);
+      rtx_base_insn prev = prev_nonnote_nondebug_insn (insn);
       rtx prev_set = prev ? single_set (prev) : NULL_RTX;
       rtx index_reg = NULL_RTX;
       rtx reg_sum = NULL_RTX;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 8fd3fa1..1434a93 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -4581,7 +4581,7 @@ reload_as_needed (int live_known)
 
   for (chain = reload_insn_chain; chain; chain = chain->next)
     {
-      rtx prev = 0;
+      rtx_base_insn prev = 0;
       rtx_base_insn insn = chain->insn;
       rtx_base_insn old_next = NEXT_INSN (insn);
 #ifdef AUTO_INC_DEC
@@ -4648,7 +4648,7 @@ reload_as_needed (int live_known)
 
 	  if (n_reloads > 0)
 	    {
-	      rtx next = NEXT_INSN (insn);
+	      rtx_base_insn next = NEXT_INSN (insn);
 	      rtx p;
 
 	      /* ??? PREV can get deleted by reload inheritance.
@@ -6430,7 +6430,7 @@ compute_reload_subreg_offset (enum machine_mode outermode,
 static void
 choose_reload_regs (struct insn_chain *chain)
 {
-  rtx insn = chain->insn;
+  rtx_base_insn insn = chain->insn;
   int i, j;
   unsigned int max_group_size = 1;
   enum reg_class group_class = NO_REGS;
@@ -7229,7 +7229,7 @@ static void
 emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
 			 rtx old, int j)
 {
-  rtx insn = chain->insn;
+  rtx_base_insn insn = chain->insn;
   rtx reloadreg;
   rtx oldequiv_reg = 0;
   rtx oldequiv = 0;
@@ -7679,7 +7679,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl,
 			  int j)
 {
   rtx reloadreg;
-  rtx insn = chain->insn;
+  rtx_base_insn insn = chain->insn;
   int special = 0;
   rtx old = rl->out;
   enum machine_mode mode;
@@ -7846,7 +7846,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl,
 		       that it is, setting new_spill_reg_store to
 		       that insn will allow an extra optimization.  */
 		    rtx s_reg = rld[s].reg_rtx;
-		    rtx next = NEXT_INSN (p);
+		    rtx_base_insn next = NEXT_INSN (p);
 		    rld[s].out = rl->out;
 		    rld[s].out_reg = rl->out_reg;
 		    set = single_set (next);
@@ -7883,7 +7883,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl,
 static void
 do_input_reload (struct insn_chain *chain, struct reload *rl, int j)
 {
-  rtx insn = chain->insn;
+  rtx_base_insn insn = chain->insn;
   rtx old = (rl->in && MEM_P (rl->in)
 	     ? rl->in_reg : rl->in);
   rtx reg_rtx = rl->reg_rtx;
@@ -7985,7 +7985,7 @@ static void
 do_output_reload (struct insn_chain *chain, struct reload *rl, int j)
 {
   rtx note, old;
-  rtx insn = chain->insn;
+  rtx_base_insn insn = chain->insn;
   /* If this is an output reload that stores something that is
      not loaded in this same reload, see if we can eliminate a previous
      store.  */
diff --git a/gcc/reorg.c b/gcc/reorg.c
index c1d9fec..374de0c 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -514,7 +514,7 @@ emit_delay_sequence (rtx insn, rtx list, int length)
 
   /* Unlink INSN from the insn chain, so that we can put it into
      the SEQUENCE.   Remember where we want to emit SEQUENCE in AFTER.  */
-  rtx after = PREV_INSN (insn);
+  rtx_base_insn after = PREV_INSN (insn);
   remove_insn (insn);
   insn->set_next_insn (NULL);
   insn->set_prev_insn (NULL);
@@ -1876,7 +1876,7 @@ get_label_before (rtx insn, rtx sibling)
 
   if (label == 0 || !LABEL_P (label))
     {
-      rtx prev = PREV_INSN (insn);
+      rtx_base_insn prev = PREV_INSN (insn);
 
       label = gen_label_rtx ();
       emit_label_after (label, prev);
@@ -2001,8 +2001,8 @@ fill_simple_delay_slots (int non_jumps_p)
 	  if (*tmp == trial)
 	    *tmp = 0;
 	  {
-	    rtx next = NEXT_INSN (trial);
-	    rtx prev = PREV_INSN (trial);
+	    rtx_base_insn next = NEXT_INSN (trial);
+	    rtx_base_insn prev = PREV_INSN (trial);
 	    if (prev)
 	      prev->set_next_insn (next);
 	    if (next)
@@ -2636,7 +2636,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
 	  && REG_P (SET_DEST (pat))
 	  && !reg_overlap_mentioned_p (SET_DEST (pat), SET_SRC (pat)))
 	{
-	  rtx next = next_nonnote_insn (trial);
+	  rtx_base_insn next = next_nonnote_insn (trial);
 
 	  if (next && NONJUMP_INSN_P (next)
 	      && GET_CODE (PATTERN (next)) != USE
@@ -3058,7 +3058,7 @@ delete_computation (rtx insn)
 #ifdef HAVE_cc0
   if (reg_referenced_p (cc0_rtx, PATTERN (insn)))
     {
-      rtx prev = prev_nonnote_insn (insn);
+      rtx_base_insn prev = prev_nonnote_insn (insn);
       /* We assume that at this stage
 	 CC's are always set explicitly
 	 and always immediately before the jump that
@@ -3109,7 +3109,7 @@ delete_jump (rtx insn)
 static rtx
 label_before_next_insn (rtx x, rtx scan_limit)
 {
-  rtx insn = next_active_insn (x);
+  rtx_base_insn insn = next_active_insn (x);
   while (insn)
     {
       insn = PREV_INSN (insn);
@@ -3605,7 +3605,7 @@ make_return_insns (rtx first)
 	 insns for its delay slots, if it needs some.  */
       if (ANY_RETURN_P (PATTERN (jump_insn)))
 	{
-	  rtx prev = PREV_INSN (insn);
+	  rtx_base_insn prev = PREV_INSN (insn);
 
 	  delete_related_insns (insn);
 	  for (i = 1; i < XVECLEN (pat, 0); i++)
diff --git a/gcc/resource.c b/gcc/resource.c
index c4325a2..256c8ba 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -174,7 +174,7 @@ next_insn_no_annul (rtx insn)
 	  && INSN_ANNULLED_BRANCH_P (insn)
 	  && NEXT_INSN (PREV_INSN (insn)) != insn)
 	{
-	  rtx next = NEXT_INSN (insn);
+	  rtx_base_insn next = NEXT_INSN (insn);
 
 	  while ((NONJUMP_INSN_P (next) || JUMP_P (next) || CALL_P (next))
 		 && INSN_FROM_TARGET_P (next))
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index f818a83..e99582d 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -3743,7 +3743,7 @@ deps_start_bb (struct deps_desc *deps, rtx head)
      hard registers correct.  */
   if (! reload_completed && !LABEL_P (head))
     {
-      rtx insn = prev_nonnote_nondebug_insn (head);
+      rtx_base_insn insn = prev_nonnote_nondebug_insn (head);
 
       if (insn && CALL_P (insn))
 	deps->in_post_call_group_p = post_call_initial;
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index bceb7fa..87997a4 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -189,7 +189,7 @@ begin_move_insn (rtx insn, rtx last)
       else
 	{
 	  /* Create an empty unreachable block after the INSN.  */
-	  rtx next = NEXT_INSN (insn);
+	  rtx_base_insn next = NEXT_INSN (insn);
 	  if (next && BARRIER_P (next))
 	    next = NEXT_INSN (next);
 	  bb = create_basic_block (next, NULL_RTX, last_bb);
diff --git a/gcc/store-motion.c b/gcc/store-motion.c
index 5eed3c1..774d5b2 100644
--- a/gcc/store-motion.c
+++ b/gcc/store-motion.c
@@ -743,8 +743,8 @@ static void
 insert_insn_start_basic_block (rtx insn, basic_block bb)
 {
   /* Insert at start of successor block.  */
-  rtx prev = PREV_INSN (BB_HEAD (bb));
-  rtx before = BB_HEAD (bb);
+  rtx_base_insn prev = PREV_INSN (BB_HEAD (bb));
+  rtx_base_insn before = BB_HEAD (bb);
   while (before != 0)
     {
       if (! LABEL_P (before)
diff --git a/gcc/valtrack.c b/gcc/valtrack.c
index 3082609..d0466b6 100644
--- a/gcc/valtrack.c
+++ b/gcc/valtrack.c
@@ -445,7 +445,8 @@ dead_debug_promote_uses (struct dead_debug_local *debug)
 					 DEBUG_EXPR_TREE_DECL (entry->dtemp),
 					 gen_rtx_UNKNOWN_VAR_LOC (),
 					 VAR_INIT_STATUS_INITIALIZED);
-	    rtx insn = emit_debug_insn_before (bind, DF_REF_INSN (ref));
+	    rtx_base_insn insn = emit_debug_insn_before (bind,
+							 DF_REF_INSN (ref));
 	    bitmap_set_bit (debug->to_rescan, INSN_UID (insn));
 	  }
 
diff --git a/gcc/web.c b/gcc/web.c
index e321c33..6c8e684 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -179,7 +179,7 @@ union_defs (df_ref use, struct web_entry *def_entry,
 
   if (insn_info)
     {
-      rtx insn = insn_info->insn;
+      rtx_base_insn insn = insn_info->insn;
       eq_use_link = DF_INSN_INFO_EQ_USES (insn_info);
       def_link = DF_INSN_INFO_DEFS (insn_info);
       set = single_set (insn);
-- 
1.7.11.7

