Commit 3ffa95c2 by David Malcolm Committed by David Malcolm

Convert edge_def.insns.r to rtx_insn *

gcc/
	* basic-block.h (struct edge_def). Strengthen "r" within
	union edge_def_insns from rtx to rtx_insn *.

	* cfgexpand.c (pass_expand::execute): Remove now-redundant cast
	from rtx to rtx_insn *.  Strengthen local "insns" from rtx to
	rtx_insn *.
	* cfgrtl.c (commit_one_edge_insertion): Remove now-redundant cast
	from rtx to rtx_insn *.
	* cprop.c (find_bypass_set): Strengthen local "insn" from rtx to
	rtx_insn *.
	* postreload-gcse.c (reg_killed_on_edge): Likewise.
	(reg_used_on_edge): Likewise.
	* tree-cfg.c (gt_ggc_mx): New overload for rtx_insn *&.
	(gt_pch_nx): New overload for rtx_insn *&.
	* tree-outof-ssa.c (expand_phi_nodes): Strengthen local "insns"
	from rtx to rtx_insn *.

From-SVN: r214471
parent d8ce2eae
2014-08-25 David Malcolm <dmalcolm@redhat.com> 2014-08-25 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (struct edge_def). Strengthen "r" within
union edge_def_insns from rtx to rtx_insn *.
* cfgexpand.c (pass_expand::execute): Remove now-redundant cast
from rtx to rtx_insn *. Strengthen local "insns" from rtx to
rtx_insn *.
* cfgrtl.c (commit_one_edge_insertion): Remove now-redundant cast
from rtx to rtx_insn *.
* cprop.c (find_bypass_set): Strengthen local "insn" from rtx to
rtx_insn *.
* postreload-gcse.c (reg_killed_on_edge): Likewise.
(reg_used_on_edge): Likewise.
* tree-cfg.c (gt_ggc_mx): New overload for rtx_insn *&.
(gt_pch_nx): New overload for rtx_insn *&.
* tree-outof-ssa.c (expand_phi_nodes): Strengthen local "insns"
from rtx to rtx_insn *.
2014-08-25 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (struct rtl_bb_info): Strengthen field "footer_" * basic-block.h (struct rtl_bb_info): Strengthen field "footer_"
from rtx to rtx_insn *. from rtx to rtx_insn *.
(BB_FOOTER): Replace function with access macro. (BB_FOOTER): Replace function with access macro.
......
...@@ -39,7 +39,7 @@ struct GTY((user)) edge_def { ...@@ -39,7 +39,7 @@ struct GTY((user)) edge_def {
/* Instructions queued on the edge. */ /* Instructions queued on the edge. */
union edge_def_insns { union edge_def_insns {
gimple_seq g; gimple_seq g;
rtx r; rtx_insn *r;
} insns; } insns;
/* Auxiliary info specific to a pass. */ /* Auxiliary info specific to a pass. */
......
...@@ -5865,14 +5865,14 @@ pass_expand::execute (function *fun) ...@@ -5865,14 +5865,14 @@ pass_expand::execute (function *fun)
{ {
if (e->insns.r) if (e->insns.r)
{ {
rebuild_jump_labels_chain (as_a <rtx_insn *> (e->insns.r)); rebuild_jump_labels_chain (e->insns.r);
/* Put insns after parm birth, but before /* Put insns after parm birth, but before
NOTE_INSNS_FUNCTION_BEG. */ NOTE_INSNS_FUNCTION_BEG. */
if (e->src == ENTRY_BLOCK_PTR_FOR_FN (fun) if (e->src == ENTRY_BLOCK_PTR_FOR_FN (fun)
&& single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (fun))) && single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (fun)))
{ {
rtx insns = e->insns.r; rtx_insn *insns = e->insns.r;
e->insns.r = NULL_RTX; e->insns.r = NULL;
if (NOTE_P (parm_birth_insn) if (NOTE_P (parm_birth_insn)
&& NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG) && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG)
emit_insn_before_noloc (insns, parm_birth_insn, e->dest); emit_insn_before_noloc (insns, parm_birth_insn, e->dest);
......
...@@ -1950,8 +1950,8 @@ commit_one_edge_insertion (edge e) ...@@ -1950,8 +1950,8 @@ commit_one_edge_insertion (edge e)
basic_block bb; basic_block bb;
/* Pull the insns off the edge now since the edge might go away. */ /* Pull the insns off the edge now since the edge might go away. */
insns = safe_as_a <rtx_insn *> (e->insns.r); insns = e->insns.r;
e->insns.r = NULL_RTX; e->insns.r = NULL;
/* Figure out where to put these insns. If the destination has /* Figure out where to put these insns. If the destination has
one predecessor, insert there. Except for the exit block. */ one predecessor, insert there. Except for the exit block. */
......
...@@ -1470,7 +1470,7 @@ find_bypass_set (int regno, int bb) ...@@ -1470,7 +1470,7 @@ find_bypass_set (int regno, int bb)
static bool static bool
reg_killed_on_edge (const_rtx reg, const_edge e) reg_killed_on_edge (const_rtx reg, const_edge e)
{ {
rtx insn; rtx_insn *insn;
for (insn = e->insns.r; insn; insn = NEXT_INSN (insn)) for (insn = e->insns.r; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn) && reg_set_p (reg, insn)) if (INSN_P (insn) && reg_set_p (reg, insn))
......
...@@ -860,7 +860,7 @@ compute_hash_table (void) ...@@ -860,7 +860,7 @@ compute_hash_table (void)
static bool static bool
reg_killed_on_edge (rtx reg, edge e) reg_killed_on_edge (rtx reg, edge e)
{ {
rtx insn; rtx_insn *insn;
for (insn = e->insns.r; insn; insn = NEXT_INSN (insn)) for (insn = e->insns.r; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn) && reg_set_p (reg, insn)) if (INSN_P (insn) && reg_set_p (reg, insn))
...@@ -877,7 +877,7 @@ reg_killed_on_edge (rtx reg, edge e) ...@@ -877,7 +877,7 @@ reg_killed_on_edge (rtx reg, edge e)
static bool static bool
reg_used_on_edge (rtx reg, edge e) reg_used_on_edge (rtx reg, edge e)
{ {
rtx insn; rtx_insn *insn;
for (insn = e->insns.r; insn; insn = NEXT_INSN (insn)) for (insn = e->insns.r; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn))) if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn)))
......
...@@ -8611,6 +8611,13 @@ extern void gt_ggc_mx (gimple&); ...@@ -8611,6 +8611,13 @@ extern void gt_ggc_mx (gimple&);
extern void gt_ggc_mx (rtx&); extern void gt_ggc_mx (rtx&);
extern void gt_ggc_mx (basic_block&); extern void gt_ggc_mx (basic_block&);
static void
gt_ggc_mx (rtx_insn *& x)
{
if (x)
gt_ggc_mx_rtx_def ((void *) x);
}
void void
gt_ggc_mx (edge_def *e) gt_ggc_mx (edge_def *e)
{ {
...@@ -8631,6 +8638,13 @@ extern void gt_pch_nx (gimple&); ...@@ -8631,6 +8638,13 @@ extern void gt_pch_nx (gimple&);
extern void gt_pch_nx (rtx&); extern void gt_pch_nx (rtx&);
extern void gt_pch_nx (basic_block&); extern void gt_pch_nx (basic_block&);
static void
gt_pch_nx (rtx_insn *& x)
{
if (x)
gt_pch_nx_rtx_def ((void *) x);
}
void void
gt_pch_nx (edge_def *e) gt_pch_nx (edge_def *e)
{ {
......
...@@ -958,9 +958,9 @@ expand_phi_nodes (struct ssaexpand *sa) ...@@ -958,9 +958,9 @@ expand_phi_nodes (struct ssaexpand *sa)
if (e->insns.r && (e->flags & EDGE_EH) if (e->insns.r && (e->flags & EDGE_EH)
&& !single_pred_p (e->dest)) && !single_pred_p (e->dest))
{ {
rtx insns = e->insns.r; rtx_insn *insns = e->insns.r;
basic_block bb; basic_block bb;
e->insns.r = NULL_RTX; e->insns.r = NULL;
bb = split_edge (e); bb = split_edge (e);
single_pred_edge (bb)->insns.r = insns; single_pred_edge (bb)->insns.r = insns;
} }
......
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