summaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-28 00:03:59 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-28 00:03:59 +0000
commitde039705b8d488cfa74607d15a1cabcb5caefc20 (patch)
tree6e015ffd2f6f050040be30de304e3e8a115eba43 /gcc/cfgbuild.c
parentddc43d91d12dab75980ff66a13dc464a1cdcce20 (diff)
downloadgcc-de039705b8d488cfa74607d15a1cabcb5caefc20.tar.gz
make forced labels a vec
gcc/ChangeLog: 2016-08-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * cfgbuild.c (make_edges): Adjust. * cfgrtl.c (can_delete_label_p): Likewise. * dwarf2cfi.c (create_trace_edges): Likewise. * except.c (sjlj_emit_dispatch_table): Likewise. * function.h (struct expr_status): make x_forced_labels a vector. * jump.c (rebuild_jump_labels_1): Adjust. * reload1.c (set_initial_label_offsets): Likewise. * stmt.c (force_label_rtx): Likewise. (expand_label): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index c1ec46ad8d7..edecab52f5d 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -204,7 +204,8 @@ make_edges (basic_block min, basic_block max, int update_p)
/* Heavy use of computed goto in machine-generated code can lead to
nearly fully-connected CFGs. In that case we spend a significant
amount of time searching the edge lists for duplicates. */
- if (forced_labels || cfun->cfg->max_jumptable_ents > 100)
+ if (!vec_safe_is_empty (forced_labels)
+ || cfun->cfg->max_jumptable_ents > 100)
edge_cache = sbitmap_alloc (last_basic_block_for_fn (cfun));
/* By nature of the way these get numbered, ENTRY_BLOCK_PTR->next_bb block
@@ -280,8 +281,10 @@ make_edges (basic_block min, basic_block max, int update_p)
everything on the forced_labels list. */
else if (computed_jump_p (insn))
{
- for (rtx_insn_list *x = forced_labels; x; x = x->next ())
- make_label_edge (edge_cache, bb, x->insn (), EDGE_ABNORMAL);
+ rtx_insn *insn;
+ unsigned int i;
+ FOR_EACH_VEC_SAFE_ELT (forced_labels, i, insn)
+ make_label_edge (edge_cache, bb, insn, EDGE_ABNORMAL);
}
/* Returns create an exit out. */