Commit 9ee1fbb1 by David Malcolm Committed by David Malcolm

sel-sched-ir.c: Use rtx_insn

gcc/
2014-08-22  David Malcolm  <dmalcolm@redhat.com>

	* sel-sched-ir.c (vinsn_copy): Strengthen local "copy" from rtx to
	rtx_insn *.
	(speculate_expr): Likewise for locals "orig_insn_rtx",
	"spec_insn_rtx".
	(eq_transformed_insns): Likewise for locals "i1", "i2".
	(check_for_new_jump): Likewise for return type and local "end".
	(find_new_jump): Likewise for return type and local "jump".
	(sel_split_edge): Likewise for local "jump".
	(sel_create_recovery_block): Likewise.
	(sel_redirect_edge_and_branch_force): Likewise.
	(sel_redirect_edge_and_branch): Likewise.

From-SVN: r214380
parent eec818f4
2014-08-22 David Malcolm <dmalcolm@redhat.com> 2014-08-22 David Malcolm <dmalcolm@redhat.com>
* sel-sched-ir.c (vinsn_copy): Strengthen local "copy" from rtx to
rtx_insn *.
(speculate_expr): Likewise for locals "orig_insn_rtx",
"spec_insn_rtx".
(eq_transformed_insns): Likewise for locals "i1", "i2".
(check_for_new_jump): Likewise for return type and local "end".
(find_new_jump): Likewise for return type and local "jump".
(sel_split_edge): Likewise for local "jump".
(sel_create_recovery_block): Likewise.
(sel_redirect_edge_and_branch_force): Likewise.
(sel_redirect_edge_and_branch): Likewise.
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* sel-sched.c (substitute_reg_in_expr): Strengthen local * sel-sched.c (substitute_reg_in_expr): Strengthen local
"new_insn" from rtx to rtx_insn *. "new_insn" from rtx to rtx_insn *.
(create_insn_rtx_with_rhs): Likewise for return type and for local (create_insn_rtx_with_rhs): Likewise for return type and for local
......
...@@ -1246,7 +1246,7 @@ vinsn_create (insn_t insn, bool force_unique_p) ...@@ -1246,7 +1246,7 @@ vinsn_create (insn_t insn, bool force_unique_p)
vinsn_t vinsn_t
vinsn_copy (vinsn_t vi, bool reattach_p) vinsn_copy (vinsn_t vi, bool reattach_p)
{ {
rtx copy; rtx_insn *copy;
bool unique = VINSN_UNIQUE_P (vi); bool unique = VINSN_UNIQUE_P (vi);
vinsn_t new_vi; vinsn_t new_vi;
...@@ -1962,7 +1962,7 @@ int ...@@ -1962,7 +1962,7 @@ int
speculate_expr (expr_t expr, ds_t ds) speculate_expr (expr_t expr, ds_t ds)
{ {
int res; int res;
rtx orig_insn_rtx; rtx_insn *orig_insn_rtx;
rtx spec_pat; rtx spec_pat;
ds_t target_ds, current_ds; ds_t target_ds, current_ds;
...@@ -1983,7 +1983,8 @@ speculate_expr (expr_t expr, ds_t ds) ...@@ -1983,7 +1983,8 @@ speculate_expr (expr_t expr, ds_t ds)
case 1: case 1:
{ {
rtx spec_insn_rtx = create_insn_rtx_from_pattern (spec_pat, NULL_RTX); rtx_insn *spec_insn_rtx =
create_insn_rtx_from_pattern (spec_pat, NULL_RTX);
vinsn_t spec_vinsn = create_vinsn_from_insn_rtx (spec_insn_rtx, false); vinsn_t spec_vinsn = create_vinsn_from_insn_rtx (spec_insn_rtx, false);
change_vinsn_in_expr (expr, spec_vinsn); change_vinsn_in_expr (expr, spec_vinsn);
...@@ -2825,8 +2826,10 @@ hash_transformed_insns (const void *p) ...@@ -2825,8 +2826,10 @@ hash_transformed_insns (const void *p)
static int static int
eq_transformed_insns (const void *p, const void *q) eq_transformed_insns (const void *p, const void *q)
{ {
rtx i1 = VINSN_INSN_RTX (((const struct transformed_insns *) p)->vinsn_old); rtx_insn *i1 =
rtx i2 = VINSN_INSN_RTX (((const struct transformed_insns *) q)->vinsn_old); VINSN_INSN_RTX (((const struct transformed_insns *) p)->vinsn_old);
rtx_insn *i2 =
VINSN_INSN_RTX (((const struct transformed_insns *) q)->vinsn_old);
if (INSN_UID (i1) == INSN_UID (i2)) if (INSN_UID (i1) == INSN_UID (i2))
return 1; return 1;
...@@ -5434,10 +5437,10 @@ sel_split_block (basic_block bb, rtx after) ...@@ -5434,10 +5437,10 @@ sel_split_block (basic_block bb, rtx after)
/* If BB ends with a jump insn whose ID is bigger then PREV_MAX_UID, return it. /* If BB ends with a jump insn whose ID is bigger then PREV_MAX_UID, return it.
Otherwise returns NULL. */ Otherwise returns NULL. */
static rtx static rtx_insn *
check_for_new_jump (basic_block bb, int prev_max_uid) check_for_new_jump (basic_block bb, int prev_max_uid)
{ {
rtx end; rtx_insn *end;
end = sel_bb_end (bb); end = sel_bb_end (bb);
if (end && INSN_UID (end) >= prev_max_uid) if (end && INSN_UID (end) >= prev_max_uid)
...@@ -5447,10 +5450,10 @@ check_for_new_jump (basic_block bb, int prev_max_uid) ...@@ -5447,10 +5450,10 @@ check_for_new_jump (basic_block bb, int prev_max_uid)
/* Look for a new jump either in FROM_BB block or in newly created JUMP_BB block. /* Look for a new jump either in FROM_BB block or in newly created JUMP_BB block.
New means having UID at least equal to PREV_MAX_UID. */ New means having UID at least equal to PREV_MAX_UID. */
static rtx static rtx_insn *
find_new_jump (basic_block from, basic_block jump_bb, int prev_max_uid) find_new_jump (basic_block from, basic_block jump_bb, int prev_max_uid)
{ {
rtx jump; rtx_insn *jump;
/* Return immediately if no new insns were emitted. */ /* Return immediately if no new insns were emitted. */
if (get_max_uid () == prev_max_uid) if (get_max_uid () == prev_max_uid)
...@@ -5473,7 +5476,7 @@ sel_split_edge (edge e) ...@@ -5473,7 +5476,7 @@ sel_split_edge (edge e)
{ {
basic_block new_bb, src, other_bb = NULL; basic_block new_bb, src, other_bb = NULL;
int prev_max_uid; int prev_max_uid;
rtx jump; rtx_insn *jump;
src = e->src; src = e->src;
prev_max_uid = get_max_uid (); prev_max_uid = get_max_uid ();
...@@ -5536,7 +5539,7 @@ sel_create_recovery_block (insn_t orig_insn) ...@@ -5536,7 +5539,7 @@ sel_create_recovery_block (insn_t orig_insn)
{ {
basic_block first_bb, second_bb, recovery_block; basic_block first_bb, second_bb, recovery_block;
basic_block before_recovery = NULL; basic_block before_recovery = NULL;
rtx jump; rtx_insn *jump;
first_bb = BLOCK_FOR_INSN (orig_insn); first_bb = BLOCK_FOR_INSN (orig_insn);
if (sel_bb_end_p (orig_insn)) if (sel_bb_end_p (orig_insn))
...@@ -5587,7 +5590,7 @@ sel_redirect_edge_and_branch_force (edge e, basic_block to) ...@@ -5587,7 +5590,7 @@ sel_redirect_edge_and_branch_force (edge e, basic_block to)
{ {
basic_block jump_bb, src, orig_dest = e->dest; basic_block jump_bb, src, orig_dest = e->dest;
int prev_max_uid; int prev_max_uid;
rtx jump; rtx_insn *jump;
int old_seqno = -1; int old_seqno = -1;
/* This function is now used only for bookkeeping code creation, where /* This function is now used only for bookkeeping code creation, where
...@@ -5631,7 +5634,7 @@ sel_redirect_edge_and_branch (edge e, basic_block to) ...@@ -5631,7 +5634,7 @@ sel_redirect_edge_and_branch (edge e, basic_block to)
bool latch_edge_p; bool latch_edge_p;
basic_block src, orig_dest = e->dest; basic_block src, orig_dest = e->dest;
int prev_max_uid; int prev_max_uid;
rtx jump; rtx_insn *jump;
edge redirected; edge redirected;
bool recompute_toporder_p = false; bool recompute_toporder_p = false;
bool maybe_unreachable = single_pred_p (orig_dest); bool maybe_unreachable = single_pred_p (orig_dest);
......
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