aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2016-08-28 00:03:59 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2016-08-28 00:03:59 +0000
commit6f7eba349b7f2b140f163b772ba94b383d02d64e (patch)
tree6e015ffd2f6f050040be30de304e3e8a115eba43 /gcc/cfgbuild.c
parent9cad8a673f30b657218eb73565b992ba203a2581 (diff)
downloadgcc-6f7eba349b7f2b140f163b772ba94b383d02d64e.zip
gcc-6f7eba349b7f2b140f163b772ba94b383d02d64e.tar.gz
gcc-6f7eba349b7f2b140f163b772ba94b383d02d64e.tar.bz2
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. From-SVN: r239800
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 c1ec46a..edecab5 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. */