summaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-26 10:44:08 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-26 10:44:08 +0000
commit3c6549f839f8a20e05556cd302c3eb3e2816f21c (patch)
treeff74117885135e87c9fc9ad721f0180a6471bafc /gcc/gcse.c
parent74db32d08d94804aceea529f6924dada33bf1668 (diff)
downloadgcc-3c6549f839f8a20e05556cd302c3eb3e2816f21c.tar.gz
use auto_sbitmap in various places
gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 49534f255f6..c2c0e8ec690 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1691,12 +1691,11 @@ free_pre_mem (void)
static void
prune_expressions (bool pre_p)
{
- sbitmap prune_exprs;
struct gcse_expr *expr;
unsigned int ui;
basic_block bb;
- prune_exprs = sbitmap_alloc (expr_hash_table.n_elems);
+ auto_sbitmap prune_exprs (expr_hash_table.n_elems);
bitmap_clear (prune_exprs);
for (ui = 0; ui < expr_hash_table.size; ui++)
{
@@ -1767,8 +1766,6 @@ prune_expressions (bool pre_p)
break;
}
}
-
- sbitmap_free (prune_exprs);
}
/* It may be necessary to insert a large number of insns on edges to
@@ -1783,7 +1780,6 @@ static void
prune_insertions_deletions (int n_elems)
{
sbitmap_iterator sbi;
- sbitmap prune_exprs;
/* We always use I to iterate over blocks/edges and J to iterate over
expressions. */
@@ -1797,7 +1793,7 @@ prune_insertions_deletions (int n_elems)
/* Set of expressions which require too many insertions relative to
the number of deletions achieved. We will prune these out of the
insertion/deletion sets. */
- prune_exprs = sbitmap_alloc (n_elems);
+ auto_sbitmap prune_exprs (n_elems);
bitmap_clear (prune_exprs);
/* Iterate over the edges counting the number of times each expression
@@ -1835,7 +1831,6 @@ prune_insertions_deletions (int n_elems)
bitmap_clear_bit (pre_delete_map[i], j);
}
- sbitmap_free (prune_exprs);
free (insertions);
free (deletions);
}