diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-26 10:44:08 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-26 10:44:08 +0000 |
commit | 3c6549f839f8a20e05556cd302c3eb3e2816f21c (patch) | |
tree | ff74117885135e87c9fc9ad721f0180a6471bafc /gcc/loop-unroll.c | |
parent | 74db32d08d94804aceea529f6924dada33bf1668 (diff) | |
download | gcc-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/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 42b1548d1ff..b568ea56d84 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -461,7 +461,6 @@ unroll_loop_constant_iterations (struct loop *loop) { unsigned HOST_WIDE_INT niter; unsigned exit_mod; - sbitmap wont_exit; unsigned i; edge e; unsigned max_unroll = loop->lpt_decision.times; @@ -477,7 +476,7 @@ unroll_loop_constant_iterations (struct loop *loop) exit_mod = niter % (max_unroll + 1); - wont_exit = sbitmap_alloc (max_unroll + 1); + auto_sbitmap wont_exit (max_unroll + 1); bitmap_ones (wont_exit); auto_vec<edge> remove_edges; @@ -604,8 +603,6 @@ unroll_loop_constant_iterations (struct loop *loop) free_opt_info (opt_info); } - free (wont_exit); - if (exit_at_end) { basic_block exit_block = get_bb_copy (desc->in_edge->src); @@ -861,7 +858,6 @@ unroll_loop_runtime_iterations (struct loop *loop) rtx_insn *init_code, *branch_code; unsigned i, j, p; basic_block preheader, *body, swtch, ezc_swtch; - sbitmap wont_exit; int may_exit_copy; unsigned n_peel; edge e; @@ -936,7 +932,7 @@ unroll_loop_runtime_iterations (struct loop *loop) auto_vec<edge> remove_edges; - wont_exit = sbitmap_alloc (max_unroll + 2); + auto_sbitmap wont_exit (max_unroll + 2); /* Peel the first copy of loop body (almost always we must leave exit test here; the only exception is when we have extra zero check and the number @@ -1035,8 +1031,6 @@ unroll_loop_runtime_iterations (struct loop *loop) free_opt_info (opt_info); } - free (wont_exit); - if (exit_at_end) { basic_block exit_block = get_bb_copy (desc->in_edge->src); @@ -1201,7 +1195,6 @@ decide_unroll_stupid (struct loop *loop, int flags) static void unroll_loop_stupid (struct loop *loop) { - sbitmap wont_exit; unsigned nunroll = loop->lpt_decision.times; struct niter_desc *desc = get_simple_loop_desc (loop); struct opt_info *opt_info = NULL; @@ -1211,8 +1204,7 @@ unroll_loop_stupid (struct loop *loop) || flag_variable_expansion_in_unroller) opt_info = analyze_insns_in_loop (loop); - - wont_exit = sbitmap_alloc (nunroll + 1); + auto_sbitmap wont_exit (nunroll + 1); bitmap_clear (wont_exit); opt_info_start_duplication (opt_info); @@ -1231,8 +1223,6 @@ unroll_loop_stupid (struct loop *loop) free_opt_info (opt_info); } - free (wont_exit); - if (desc->simple_p) { /* We indeed may get here provided that there are nontrivial assumptions |