[PATCH 093/236] mode-switching.c: Use rtx_insn

David Malcolm dmalcolm@redhat.com
Wed Aug 6 17:45:00 GMT 2014


gcc/
	* mode-switching.c (struct seginfo): Strengthen field "insn_ptr"
	from rtx to rtx_insn *.
	(new_seginfo): Likewise for param "insn".
	(create_pre_exit): Likewise for locals "last_insn",
	"before_return_copy", "return_copy".
	(optimize_mode_switching): Likewise for locals "insn", "ins_pos",
	"mode_set".
---
 gcc/mode-switching.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index c06f113..4d590e2 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -70,7 +70,7 @@ along with GCC; see the file COPYING3.  If not see
 struct seginfo
 {
   int mode;
-  rtx insn_ptr;
+  rtx_insn *insn_ptr;
   int bbnum;
   struct seginfo *next;
   HARD_REG_SET regs_live;
@@ -88,7 +88,7 @@ static sbitmap *antic;
 static sbitmap *transp;
 static sbitmap *comp;
 
-static struct seginfo * new_seginfo (int, rtx, int, HARD_REG_SET);
+static struct seginfo * new_seginfo (int, rtx_insn *, int, HARD_REG_SET);
 static void add_seginfo (struct bb_info *, struct seginfo *);
 static void reg_dies (rtx, HARD_REG_SET *);
 static void reg_becomes_live (rtx, const_rtx, void *);
@@ -102,7 +102,7 @@ static void make_preds_opaque (basic_block, int);
    manner.  */
 
 static struct seginfo *
-new_seginfo (int mode, rtx insn, int bb, HARD_REG_SET regs_live)
+new_seginfo (int mode, rtx_insn *insn, int bb, HARD_REG_SET regs_live)
 {
   struct seginfo *ptr;
 
@@ -214,7 +214,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
     if (eg->flags & EDGE_FALLTHRU)
       {
 	basic_block src_bb = eg->src;
-	rtx last_insn, ret_reg;
+	rtx_insn *last_insn;
+	rtx ret_reg;
 
 	gcc_assert (!pre_exit);
 	/* If this function returns a value at the end, we have to
@@ -231,11 +232,11 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
 	    bool short_block = false;
 	    bool multi_reg_return = false;
 	    bool forced_late_switch = false;
-	    rtx before_return_copy;
+	    rtx_insn *before_return_copy;
 
 	    do
 	      {
-		rtx return_copy = PREV_INSN (last_insn);
+		rtx_insn *return_copy = PREV_INSN (last_insn);
 		rtx return_copy_pat, copy_reg;
 		int copy_start, copy_num;
 		int j;
@@ -452,7 +453,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
 static int
 optimize_mode_switching (void)
 {
-  rtx insn;
+  rtx_insn *insn;
   int e;
   basic_block bb;
   int need_commit = 0;
@@ -540,7 +541,7 @@ optimize_mode_switching (void)
 		break;
 	    if (e)
 	      {
-		rtx ins_pos = BB_HEAD (bb);
+		rtx_insn *ins_pos = BB_HEAD (bb);
 		if (LABEL_P (ins_pos))
 		  ins_pos = NEXT_INSN (ins_pos);
 		gcc_assert (NOTE_INSN_BASIC_BLOCK_P (ins_pos));
@@ -674,7 +675,7 @@ optimize_mode_switching (void)
 	      int mode;
 	      basic_block src_bb;
 	      HARD_REG_SET live_at_edge;
-	      rtx mode_set;
+	      rtx_insn *mode_set;
 
 	      eg->aux = 0;
 
@@ -734,7 +735,7 @@ optimize_mode_switching (void)
 	      next = ptr->next;
 	      if (ptr->mode != no_mode)
 		{
-		  rtx mode_set;
+		  rtx_insn *mode_set;
 
 		  rtl_profile_for_bb (bb);
 		  start_sequence ();
-- 
1.8.5.3



More information about the Gcc-patches mailing list