From 0e3de1d41eb6179eac75c8ae44c16c1ba1d2f5dd Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sun, 14 May 2017 00:38:48 +0000 Subject: use auto_bitmap more gcc/ChangeLog: 2017-05-13 Trevor Saunders * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap lifetime. (migrate_btr_def): Likewise. * cfgloop.c (get_loop_body_in_bfs_order): Likewise. * df-core.c (loop_post_order_compute): Likewise. (loop_inverted_post_order_compute): Likewise. * hsa-common.h: Likewise. * hsa-gen.c (hsa_bb::~hsa_bb): Likewise. * init-regs.c (initialize_uninitialized_regs): Likewise. * ipa-inline.c (resolve_noninline_speculation): Likewise. (inline_small_functions): Likewise. * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise. * ira.c (combine_and_move_insns): Likewise. (build_insn_chain): Likewise. * loop-invariant.c (find_invariants): Likewise. * lower-subreg.c (propagate_pseudo_copies): Likewise. * predict.c (tree_predict_by_opcode): Likewise. (predict_paths_leading_to): Likewise. (predict_paths_leading_to_edge): Likewise. (estimate_loops_at_level): Likewise. (estimate_loops): Likewise. * shrink-wrap.c (try_shrink_wrapping): Likewise. (spread_components): Likewise. * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise. * tree-loop-distribution.c (rdg_build_partitions): Likewise. * tree-predcom.c (tree_predictive_commoning_loop): Likewise. * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise. * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise. * tree-ssa-pre.c (remove_dead_inserted_code): Likewise. * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise. * tree-ssa-threadupdate.c (compute_path_counts): Likewise. (mark_threaded_blocks): Likewise. (thread_through_all_blocks): Likewise. * tree-ssa.c (verify_ssa): Likewise. (execute_update_addresses_taken): Likewise. * tree-ssanames.c (verify_ssaname_freelists): Likewise. From-SVN: r248021 --- gcc/cfgloop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/cfgloop.c') diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index afd56bb..654d188 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -923,7 +923,6 @@ get_loop_body_in_bfs_order (const struct loop *loop) { basic_block *blocks; basic_block bb; - bitmap visited; unsigned int i = 1; unsigned int vc = 0; @@ -931,7 +930,7 @@ get_loop_body_in_bfs_order (const struct loop *loop) gcc_assert (loop->latch != EXIT_BLOCK_PTR_FOR_FN (cfun)); blocks = XNEWVEC (basic_block, loop->num_nodes); - visited = BITMAP_ALLOC (NULL); + auto_bitmap visited; blocks[0] = loop->header; bitmap_set_bit (visited, loop->header->index); while (i < loop->num_nodes) @@ -952,7 +951,6 @@ get_loop_body_in_bfs_order (const struct loop *loop) } } - BITMAP_FREE (visited); return blocks; } -- cgit v1.1