Commit c0d105c6 by Richard Biener Committed by Richard Biener

df-problems.c (df_rd_local_compute): Use bitmap_release.

2018-12-06  Richard Biener  <rguenther@suse.de>

	* df-problems.c (df_rd_local_compute): Use bitmap_release.
	(df_live_free): Likewise.
	(df_md_local_compute): Likewise.
	(df_md_free): Release df_md_scratch bitmap.
	* loop-invariant.c (calculate_loop_reg_pressure): Use
	bitmap_release.
	* sched-deps.c (true_dependency_cache, output_dependency_cache,
	anti_dependency_cache, control_dependency_cache,
	spec_dependency_cache): Use bitmap instead of bitmap_head *.
	* sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
	dont_calc_deps as bitmap allocated from obstack not GC.
	(schedule_ebbs_finish): Use bitmap_release.
	* sched-rgn.c (schedule_insns): Initialize non-GTY
	not_in_df as bitmap allocated from obstack not GC.
	Use bitmap_release.
	* sel-sched.c (_forced_ebb_heads): Remove premature optimization.
	(sel_region_init): Allocate forced_ebb_heads.
	(sel_region_finish): Free forced_ebb_heads.

From-SVN: r266851
parent 1c252ef3
2018-12-06 Richard Biener <rguenther@suse.de> 2018-12-06 Richard Biener <rguenther@suse.de>
* df-problems.c (df_rd_local_compute): Use bitmap_release.
(df_live_free): Likewise.
(df_md_local_compute): Likewise.
(df_md_free): Release df_md_scratch bitmap.
* loop-invariant.c (calculate_loop_reg_pressure): Use
bitmap_release.
* sched-deps.c (true_dependency_cache, output_dependency_cache,
anti_dependency_cache, control_dependency_cache,
spec_dependency_cache): Use bitmap instead of bitmap_head *.
* sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
dont_calc_deps as bitmap allocated from obstack not GC.
(schedule_ebbs_finish): Use bitmap_release.
* sched-rgn.c (schedule_insns): Initialize non-GTY
not_in_df as bitmap allocated from obstack not GC.
Use bitmap_release.
* sel-sched.c (_forced_ebb_heads): Remove premature optimization.
(sel_region_init): Allocate forced_ebb_heads.
(sel_region_finish): Free forced_ebb_heads.
2018-12-06 Richard Biener <rguenther@suse.de>
* bitmap.c (bitmap_head::crashme): Define. * bitmap.c (bitmap_head::crashme): Define.
* bitmap.h (bitmap_head): Add constexpr default constructor * bitmap.h (bitmap_head): Add constexpr default constructor
poisoning the obstack member. poisoning the obstack member.
...@@ -419,8 +419,8 @@ df_rd_local_compute (bitmap all_blocks) ...@@ -419,8 +419,8 @@ df_rd_local_compute (bitmap all_blocks)
} }
} }
bitmap_clear (&seen_in_block); bitmap_release (&seen_in_block);
bitmap_clear (&seen_in_insn); bitmap_release (&seen_in_insn);
} }
...@@ -1585,7 +1585,7 @@ df_live_free (void) ...@@ -1585,7 +1585,7 @@ df_live_free (void)
df_live->block_info_size = 0; df_live->block_info_size = 0;
free (df_live->block_info); free (df_live->block_info);
df_live->block_info = NULL; df_live->block_info = NULL;
bitmap_clear (&df_live_scratch); bitmap_release (&df_live_scratch);
bitmap_obstack_release (&problem_data->live_bitmaps); bitmap_obstack_release (&problem_data->live_bitmaps);
free (problem_data); free (problem_data);
df_live->problem_data = NULL; df_live->problem_data = NULL;
...@@ -4533,7 +4533,7 @@ df_md_local_compute (bitmap all_blocks) ...@@ -4533,7 +4533,7 @@ df_md_local_compute (bitmap all_blocks)
df_md_bb_local_compute (bb_index); df_md_bb_local_compute (bb_index);
} }
bitmap_clear (&seen_in_insn); bitmap_release (&seen_in_insn);
frontiers = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun)); frontiers = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
FOR_ALL_BB_FN (bb, cfun) FOR_ALL_BB_FN (bb, cfun)
...@@ -4649,6 +4649,7 @@ df_md_free (void) ...@@ -4649,6 +4649,7 @@ df_md_free (void)
struct df_md_problem_data *problem_data struct df_md_problem_data *problem_data
= (struct df_md_problem_data *) df_md->problem_data; = (struct df_md_problem_data *) df_md->problem_data;
bitmap_release (&df_md_scratch);
bitmap_obstack_release (&problem_data->md_bitmaps); bitmap_obstack_release (&problem_data->md_bitmaps);
free (problem_data); free (problem_data);
df_md->problem_data = NULL; df_md->problem_data = NULL;
......
...@@ -2201,7 +2201,7 @@ calculate_loop_reg_pressure (void) ...@@ -2201,7 +2201,7 @@ calculate_loop_reg_pressure (void)
} }
} }
} }
bitmap_clear (&curr_regs_live); bitmap_release (&curr_regs_live);
if (flag_ira_region == IRA_REGION_MIXED if (flag_ira_region == IRA_REGION_MIXED
|| flag_ira_region == IRA_REGION_ALL) || flag_ira_region == IRA_REGION_ALL)
FOR_EACH_LOOP (loop, 0) FOR_EACH_LOOP (loop, 0)
......
...@@ -461,11 +461,11 @@ static HARD_REG_SET implicit_reg_pending_uses; ...@@ -461,11 +461,11 @@ static HARD_REG_SET implicit_reg_pending_uses;
has enough entries to represent a dependency on any other insn in has enough entries to represent a dependency on any other insn in
the insn chain. All bitmap for true dependencies cache is the insn chain. All bitmap for true dependencies cache is
allocated then the rest two ones are also allocated. */ allocated then the rest two ones are also allocated. */
static bitmap_head *true_dependency_cache = NULL; static bitmap true_dependency_cache = NULL;
static bitmap_head *output_dependency_cache = NULL; static bitmap output_dependency_cache = NULL;
static bitmap_head *anti_dependency_cache = NULL; static bitmap anti_dependency_cache = NULL;
static bitmap_head *control_dependency_cache = NULL; static bitmap control_dependency_cache = NULL;
static bitmap_head *spec_dependency_cache = NULL; static bitmap spec_dependency_cache = NULL;
static int cache_size; static int cache_size;
/* True if we should mark added dependencies as a non-register deps. */ /* True if we should mark added dependencies as a non-register deps. */
......
...@@ -588,15 +588,14 @@ schedule_ebbs_init (void) ...@@ -588,15 +588,14 @@ schedule_ebbs_init (void)
compute_bb_for_insn (); compute_bb_for_insn ();
/* Initialize DONT_CALC_DEPS and ebb-{start, end} markers. */ /* Initialize DONT_CALC_DEPS and ebb-{start, end} markers. */
bitmap_initialize (&dont_calc_deps, 0); bitmap_initialize (&dont_calc_deps, &bitmap_default_obstack);
bitmap_clear (&dont_calc_deps);
} }
/* Perform cleanups after scheduling using schedules_ebbs or schedule_ebb. */ /* Perform cleanups after scheduling using schedules_ebbs or schedule_ebb. */
void void
schedule_ebbs_finish (void) schedule_ebbs_finish (void)
{ {
bitmap_clear (&dont_calc_deps); bitmap_release (&dont_calc_deps);
/* Reposition the prologue and epilogue notes in case we moved the /* Reposition the prologue and epilogue notes in case we moved the
prologue/epilogue insns. */ prologue/epilogue insns. */
......
...@@ -3507,8 +3507,7 @@ schedule_insns (void) ...@@ -3507,8 +3507,7 @@ schedule_insns (void)
haifa_sched_init (); haifa_sched_init ();
sched_rgn_init (reload_completed); sched_rgn_init (reload_completed);
bitmap_initialize (&not_in_df, 0); bitmap_initialize (&not_in_df, &bitmap_default_obstack);
bitmap_clear (&not_in_df);
/* Schedule every region in the subroutine. */ /* Schedule every region in the subroutine. */
for (rgn = 0; rgn < nr_regions; rgn++) for (rgn = 0; rgn < nr_regions; rgn++)
...@@ -3517,7 +3516,7 @@ schedule_insns (void) ...@@ -3517,7 +3516,7 @@ schedule_insns (void)
/* Clean up. */ /* Clean up. */
sched_rgn_finish (); sched_rgn_finish ();
bitmap_clear (&not_in_df); bitmap_release (&not_in_df);
haifa_sched_finish (); haifa_sched_finish ();
} }
......
...@@ -473,8 +473,7 @@ static int first_emitted_uid; ...@@ -473,8 +473,7 @@ static int first_emitted_uid;
/* Set of basic blocks that are forced to start new ebbs. This is a subset /* Set of basic blocks that are forced to start new ebbs. This is a subset
of all the ebb heads. */ of all the ebb heads. */
static bitmap_head _forced_ebb_heads; bitmap forced_ebb_heads;
bitmap_head *forced_ebb_heads = &_forced_ebb_heads;
/* Blocks that need to be rescheduled after pipelining. */ /* Blocks that need to be rescheduled after pipelining. */
bitmap blocks_to_reschedule = NULL; bitmap blocks_to_reschedule = NULL;
...@@ -6947,8 +6946,7 @@ sel_region_init (int rgn) ...@@ -6947,8 +6946,7 @@ sel_region_init (int rgn)
memset (reg_rename_tick, 0, sizeof reg_rename_tick); memset (reg_rename_tick, 0, sizeof reg_rename_tick);
reg_rename_this_tick = 0; reg_rename_this_tick = 0;
bitmap_initialize (forced_ebb_heads, 0); forced_ebb_heads = BITMAP_ALLOC (NULL);
bitmap_clear (forced_ebb_heads);
setup_nop_vinsn (); setup_nop_vinsn ();
current_copies = BITMAP_ALLOC (NULL); current_copies = BITMAP_ALLOC (NULL);
...@@ -7290,7 +7288,7 @@ sel_region_finish (bool reset_sched_cycles_p) ...@@ -7290,7 +7288,7 @@ sel_region_finish (bool reset_sched_cycles_p)
sel_finish_global_and_expr (); sel_finish_global_and_expr ();
bitmap_clear (forced_ebb_heads); BITMAP_FREE (forced_ebb_heads);
free_nop_vinsn (); free_nop_vinsn ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment