aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2017-05-14 00:38:48 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2017-05-14 00:38:48 +0000
commit0e3de1d41eb6179eac75c8ae44c16c1ba1d2f5dd (patch)
tree6de1ecd2f719b8ec208ed45a232c64387837fa79 /gcc/ira.c
parent792bb49bb0732500fe4e87fbeae4aee3cb187112 (diff)
downloadgcc-0e3de1d41eb6179eac75c8ae44c16c1ba1d2f5dd.zip
gcc-0e3de1d41eb6179eac75c8ae44c16c1ba1d2f5dd.tar.gz
gcc-0e3de1d41eb6179eac75c8ae44c16c1ba1d2f5dd.tar.bz2
use auto_bitmap more
gcc/ChangeLog: 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * 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
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index bfb0508..c9751ce 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3698,7 +3698,7 @@ add_store_equivs (void)
static void
combine_and_move_insns (void)
{
- bitmap cleared_regs = BITMAP_ALLOC (NULL);
+ auto_bitmap cleared_regs;
int max = max_reg_num ();
for (int regno = FIRST_PSEUDO_REGISTER; regno < max; regno++)
@@ -3856,8 +3856,6 @@ combine_and_move_insns (void)
df_insn_rescan (insn);
}
}
-
- BITMAP_FREE (cleared_regs);
}
/* A pass over indirect jumps, converting simple cases to direct jumps.
@@ -4083,8 +4081,8 @@ build_insn_chain (void)
basic_block bb;
struct insn_chain *c = NULL;
struct insn_chain *next = NULL;
- bitmap live_relevant_regs = BITMAP_ALLOC (NULL);
- bitmap elim_regset = BITMAP_ALLOC (NULL);
+ auto_bitmap live_relevant_regs;
+ auto_bitmap elim_regset;
/* live_subregs is a vector used to keep accurate information about
which hardregs are live in multiword pseudos. live_subregs and
live_subregs_used are indexed by pseudo number. The live_subreg
@@ -4093,7 +4091,7 @@ build_insn_chain (void)
live_subreg[allocno] is number of bytes that the pseudo can
occupy. */
sbitmap *live_subregs = XCNEWVEC (sbitmap, max_regno);
- bitmap live_subregs_used = BITMAP_ALLOC (NULL);
+ auto_bitmap live_subregs_used;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (eliminable_regset, i))
@@ -4336,9 +4334,6 @@ build_insn_chain (void)
if (live_subregs[i] != NULL)
sbitmap_free (live_subregs[i]);
free (live_subregs);
- BITMAP_FREE (live_subregs_used);
- BITMAP_FREE (live_relevant_regs);
- BITMAP_FREE (elim_regset);
if (dump_file)
print_insn_chains (dump_file);