Commit 1d455520 by David Malcolm Committed by David Malcolm

mode-switching.c: Use rtx_insn

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".

From-SVN: r214349
parent cfa434f6
2014-08-22 David Malcolm <dmalcolm@redhat.com> 2014-08-22 David Malcolm <dmalcolm@redhat.com>
* 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".
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* lra-int.h (struct lra_insn_recog_data): Strengthen field "insn" * lra-int.h (struct lra_insn_recog_data): Strengthen field "insn"
from rtx to rtx_insn *. from rtx to rtx_insn *.
(lra_push_insn): Likewise for 1st param. (lra_push_insn): Likewise for 1st param.
......
...@@ -70,7 +70,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -70,7 +70,7 @@ along with GCC; see the file COPYING3. If not see
struct seginfo struct seginfo
{ {
int mode; int mode;
rtx insn_ptr; rtx_insn *insn_ptr;
int bbnum; int bbnum;
struct seginfo *next; struct seginfo *next;
HARD_REG_SET regs_live; HARD_REG_SET regs_live;
...@@ -84,7 +84,7 @@ struct bb_info ...@@ -84,7 +84,7 @@ struct bb_info
int mode_in; int mode_in;
}; };
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 add_seginfo (struct bb_info *, struct seginfo *);
static void reg_dies (rtx, HARD_REG_SET *); static void reg_dies (rtx, HARD_REG_SET *);
static void reg_becomes_live (rtx, const_rtx, void *); static void reg_becomes_live (rtx, const_rtx, void *);
...@@ -154,7 +154,7 @@ commit_mode_sets (struct edge_list *edge_list, int e, struct bb_info *info) ...@@ -154,7 +154,7 @@ commit_mode_sets (struct edge_list *edge_list, int e, struct bb_info *info)
manner. */ manner. */
static struct seginfo * 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; struct seginfo *ptr;
...@@ -242,7 +242,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) ...@@ -242,7 +242,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
if (eg->flags & EDGE_FALLTHRU) if (eg->flags & EDGE_FALLTHRU)
{ {
basic_block src_bb = eg->src; basic_block src_bb = eg->src;
rtx last_insn, ret_reg; rtx_insn *last_insn;
rtx ret_reg;
gcc_assert (!pre_exit); gcc_assert (!pre_exit);
/* If this function returns a value at the end, we have to /* If this function returns a value at the end, we have to
...@@ -259,11 +260,11 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) ...@@ -259,11 +260,11 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
bool short_block = false; bool short_block = false;
bool multi_reg_return = false; bool multi_reg_return = false;
bool forced_late_switch = false; bool forced_late_switch = false;
rtx before_return_copy; rtx_insn *before_return_copy;
do do
{ {
rtx return_copy = PREV_INSN (last_insn); rtx_insn *return_copy = PREV_INSN (last_insn);
rtx return_copy_pat, copy_reg; rtx return_copy_pat, copy_reg;
int copy_start, copy_num; int copy_start, copy_num;
int j; int j;
...@@ -559,7 +560,7 @@ optimize_mode_switching (void) ...@@ -559,7 +560,7 @@ optimize_mode_switching (void)
int e = entity_map[j]; int e = entity_map[j];
int no_mode = num_modes[e]; int no_mode = num_modes[e];
struct bb_info *info = bb_info[j]; struct bb_info *info = bb_info[j];
rtx insn; rtx_insn *insn;
/* Determine what the first use (if any) need for a mode of entity E is. /* Determine what the first use (if any) need for a mode of entity E is.
This will be the mode that is anticipatable for this block. This will be the mode that is anticipatable for this block.
...@@ -584,7 +585,7 @@ optimize_mode_switching (void) ...@@ -584,7 +585,7 @@ optimize_mode_switching (void)
break; break;
if (eg) if (eg)
{ {
rtx ins_pos = BB_HEAD (bb); rtx_insn *ins_pos = BB_HEAD (bb);
if (LABEL_P (ins_pos)) if (LABEL_P (ins_pos))
ins_pos = NEXT_INSN (ins_pos); ins_pos = NEXT_INSN (ins_pos);
gcc_assert (NOTE_INSN_BASIC_BLOCK_P (ins_pos)); gcc_assert (NOTE_INSN_BASIC_BLOCK_P (ins_pos));
...@@ -785,7 +786,7 @@ optimize_mode_switching (void) ...@@ -785,7 +786,7 @@ optimize_mode_switching (void)
next = ptr->next; next = ptr->next;
if (ptr->mode != no_mode) if (ptr->mode != no_mode)
{ {
rtx mode_set; rtx_insn *mode_set;
rtl_profile_for_bb (bb); rtl_profile_for_bb (bb);
start_sequence (); start_sequence ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment