Commit e8c038ca by David Malcolm Committed by David Malcolm

Convert forced_labels from an EXPR_LIST to an INSN_LIST

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

	* function.h (struct expr_status): Convert field "x_forced_labels"
	from rtx_expr_list * to rtx_insn_list *.

	* cfgbuild.c (make_edges): Convert local "x" from an
	rtx_expr_list * to an rtx_insn_list *, replacing use of
	"element" method with "insn" method.
	* dwarf2cfi.c (create_trace_edges): Likewise for local "lab".
	* except.c (sjlj_emit_dispatch_table): Replace use of
	gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending to
	forced_labels.
	* jump.c (rebuild_jump_labels_1): Convert local "insn" from an
	rtx_expr_list * to an rtx_insn_list *, replacing use of
	"element" method with "insn" method.
	* reload1.c (set_initial_label_offsets): Likewise for local "x".
	* stmt.c (label_rtx): Strengthen local "ref" from rtx to
	rtx_insn *, adding a checked cast.  Replace use of
	gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending it to
	forced_labels.
	(expand_label): Likewise for local "label_r".

From-SVN: r214688
parent b5241a5a
2014-08-28 David Malcolm <dmalcolm@redhat.com> 2014-08-28 David Malcolm <dmalcolm@redhat.com>
* function.h (struct expr_status): Convert field "x_forced_labels"
from rtx_expr_list * to rtx_insn_list *.
* cfgbuild.c (make_edges): Convert local "x" from an
rtx_expr_list * to an rtx_insn_list *, replacing use of
"element" method with "insn" method.
* dwarf2cfi.c (create_trace_edges): Likewise for local "lab".
* except.c (sjlj_emit_dispatch_table): Replace use of
gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending to
forced_labels.
* jump.c (rebuild_jump_labels_1): Convert local "insn" from an
rtx_expr_list * to an rtx_insn_list *, replacing use of
"element" method with "insn" method.
* reload1.c (set_initial_label_offsets): Likewise for local "x".
* stmt.c (label_rtx): Strengthen local "ref" from rtx to
rtx_insn *, adding a checked cast. Replace use of
gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending it to
forced_labels.
(expand_label): Likewise for local "label_r".
2014-08-28 David Malcolm <dmalcolm@redhat.com>
* function.h (struct rtl_data): Convert field * function.h (struct rtl_data): Convert field
"x_nonlocal_goto_handler_labels" from rtx_expr_list * to "x_nonlocal_goto_handler_labels" from rtx_expr_list * to
rtx_insn_list *. rtx_insn_list *.
...@@ -284,8 +284,8 @@ make_edges (basic_block min, basic_block max, int update_p) ...@@ -284,8 +284,8 @@ make_edges (basic_block min, basic_block max, int update_p)
everything on the forced_labels list. */ everything on the forced_labels list. */
else if (computed_jump_p (insn)) else if (computed_jump_p (insn))
{ {
for (rtx_expr_list *x = forced_labels; x; x = x->next ()) for (rtx_insn_list *x = forced_labels; x; x = x->next ())
make_label_edge (edge_cache, bb, x->element (), EDGE_ABNORMAL); make_label_edge (edge_cache, bb, x->insn (), EDGE_ABNORMAL);
} }
/* Returns create an exit out. */ /* Returns create an exit out. */
......
...@@ -2309,8 +2309,8 @@ create_trace_edges (rtx insn) ...@@ -2309,8 +2309,8 @@ create_trace_edges (rtx insn)
} }
else if (computed_jump_p (insn)) else if (computed_jump_p (insn))
{ {
for (rtx_expr_list *lab = forced_labels; lab; lab = lab->next ()) for (rtx_insn_list *lab = forced_labels; lab; lab = lab->next ())
maybe_record_trace_start (lab->element (), insn); maybe_record_trace_start (lab->insn (), insn);
} }
else if (returnjump_p (insn)) else if (returnjump_p (insn))
; ;
......
...@@ -1310,7 +1310,7 @@ sjlj_emit_dispatch_table (rtx_code_label *dispatch_label, int num_dispatch) ...@@ -1310,7 +1310,7 @@ sjlj_emit_dispatch_table (rtx_code_label *dispatch_label, int num_dispatch)
CFG edges more exactly, we can use the forced_labels list instead. */ CFG edges more exactly, we can use the forced_labels list instead. */
LABEL_PRESERVE_P (dispatch_label) = 1; LABEL_PRESERVE_P (dispatch_label) = 1;
forced_labels forced_labels
= gen_rtx_EXPR_LIST (VOIDmode, dispatch_label, forced_labels); = gen_rtx_INSN_LIST (VOIDmode, dispatch_label, forced_labels);
#endif #endif
/* Load up exc_ptr and filter values from the function context. */ /* Load up exc_ptr and filter values from the function context. */
......
...@@ -135,7 +135,7 @@ struct GTY(()) expr_status { ...@@ -135,7 +135,7 @@ struct GTY(()) expr_status {
rtx x_apply_args_value; rtx x_apply_args_value;
/* List of labels that must never be deleted. */ /* List of labels that must never be deleted. */
rtx_expr_list *x_forced_labels; rtx_insn_list *x_forced_labels;
}; };
typedef struct call_site_record_d *call_site_record; typedef struct call_site_record_d *call_site_record;
......
...@@ -74,7 +74,7 @@ static int invert_exp_1 (rtx, rtx); ...@@ -74,7 +74,7 @@ static int invert_exp_1 (rtx, rtx);
static void static void
rebuild_jump_labels_1 (rtx_insn *f, bool count_forced) rebuild_jump_labels_1 (rtx_insn *f, bool count_forced)
{ {
rtx_expr_list *insn; rtx_insn_list *insn;
timevar_push (TV_REBUILD_JUMP); timevar_push (TV_REBUILD_JUMP);
init_label_info (f); init_label_info (f);
...@@ -86,8 +86,8 @@ rebuild_jump_labels_1 (rtx_insn *f, bool count_forced) ...@@ -86,8 +86,8 @@ rebuild_jump_labels_1 (rtx_insn *f, bool count_forced)
if (count_forced) if (count_forced)
for (insn = forced_labels; insn; insn = insn->next ()) for (insn = forced_labels; insn; insn = insn->next ())
if (LABEL_P (insn->element ())) if (LABEL_P (insn->insn ()))
LABEL_NUSES (insn->element ())++; LABEL_NUSES (insn->insn ())++;
timevar_pop (TV_REBUILD_JUMP); timevar_pop (TV_REBUILD_JUMP);
} }
......
...@@ -3911,9 +3911,9 @@ set_initial_label_offsets (void) ...@@ -3911,9 +3911,9 @@ set_initial_label_offsets (void)
{ {
memset (offsets_known_at, 0, num_labels); memset (offsets_known_at, 0, num_labels);
for (rtx_expr_list *x = forced_labels; x; x = x->next ()) for (rtx_insn_list *x = forced_labels; x; x = x->next ())
if (x->element ()) if (x->insn ())
set_label_offsets (x->element (), NULL, 1); set_label_offsets (x->insn (), NULL, 1);
for (rtx_insn_list *x = nonlocal_goto_handler_labels; x; x = x->next ()) for (rtx_insn_list *x = nonlocal_goto_handler_labels; x; x = x->next ())
if (x->insn ()) if (x->insn ())
......
...@@ -141,12 +141,12 @@ label_rtx (tree label) ...@@ -141,12 +141,12 @@ label_rtx (tree label)
rtx rtx
force_label_rtx (tree label) force_label_rtx (tree label)
{ {
rtx ref = label_rtx (label); rtx_insn *ref = as_a <rtx_insn *> (label_rtx (label));
tree function = decl_function_context (label); tree function = decl_function_context (label);
gcc_assert (function); gcc_assert (function);
forced_labels = gen_rtx_EXPR_LIST (VOIDmode, ref, forced_labels); forced_labels = gen_rtx_INSN_LIST (VOIDmode, ref, forced_labels);
return ref; return ref;
} }
...@@ -176,7 +176,7 @@ emit_jump (rtx label) ...@@ -176,7 +176,7 @@ emit_jump (rtx label)
void void
expand_label (tree label) expand_label (tree label)
{ {
rtx label_r = label_rtx (label); rtx_insn *label_r = as_a <rtx_insn *> (label_rtx (label));
do_pending_stack_adjust (); do_pending_stack_adjust ();
emit_label (label_r); emit_label (label_r);
...@@ -192,7 +192,7 @@ expand_label (tree label) ...@@ -192,7 +192,7 @@ expand_label (tree label)
} }
if (FORCED_LABEL (label)) if (FORCED_LABEL (label))
forced_labels = gen_rtx_EXPR_LIST (VOIDmode, label_r, forced_labels); forced_labels = gen_rtx_INSN_LIST (VOIDmode, label_r, forced_labels);
if (DECL_NONLOCAL (label) || FORCED_LABEL (label)) if (DECL_NONLOCAL (label) || FORCED_LABEL (label))
maybe_set_first_label_num (label_r); maybe_set_first_label_num (label_r);
......
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