diff options
author | Jan Hubicka <jh@suse.cz> | 2010-06-06 21:29:01 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-06-06 19:29:01 +0000 |
commit | a7e3698d81844438d339a957ba4fe7ead0ee2357 (patch) | |
tree | 33762169b920df538a949d4040921754532aa165 /gcc/df-core.c | |
parent | e62b90b403f1e528aef8dc5042e45f921b365cf8 (diff) | |
download | gcc-a7e3698d81844438d339a957ba4fe7ead0ee2357.zip gcc-a7e3698d81844438d339a957ba4fe7ead0ee2357.tar.gz gcc-a7e3698d81844438d339a957ba4fe7ead0ee2357.tar.bz2 |
df-core.c (df_set_blocks): Use bitmap_head instead of bitmap.
* df-core.c (df_set_blocks): Use bitmap_head instead of bitmap.
(df_compact_blocks): Likewise.
* df.h (struct df): Turn hardware_regs_used,
regular_block_artificial_uses, eh_block_artificial_uses,
insns_to_delete, insns_to_rescan, insns_to_notes_rescan into
bitmap_head.
* df-problems.c (df_lr_local_compute, df_lr_confluence_0,
df_byte_lr_alloc, df_simulate_fixup_sets): Update.
* df-scan.c (df_scan_free_internal, df_scan_alloc, df_scan_start_dump,
df_scan_blocks, df_insn_delete, df_insn_rescan,
df_insn_rescan_debug_internal, df_insn_rescan_all,
df_process_deferred_rescans, df_process_deferred_rescans,
df_notes_rescan, df_get_call_refs, df_get_call_refs,
regs_invalidated_by_call_regset, df_get_call_refs, df_bb_refs_collect,
df_record_entry_block_defs, df_record_exit_block_uses,
df_update_exit_block_uses, df_bb_verify, df_entry_block_bitmap_verify,
df_scan_verify): Update.
From-SVN: r160348
Diffstat (limited to 'gcc/df-core.c')
-rw-r--r-- | gcc/df-core.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/gcc/df-core.c b/gcc/df-core.c index 0930a02..8c4b79b 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -504,8 +504,9 @@ df_set_blocks (bitmap blocks) /* This block is called to change the focus from one subset to another. */ int p; - bitmap diff = BITMAP_ALLOC (&df_bitmap_obstack); - bitmap_and_compl (diff, df->blocks_to_analyze, blocks); + bitmap_head diff; + bitmap_initialize (&diff, &df_bitmap_obstack); + bitmap_and_compl (&diff, df->blocks_to_analyze, blocks); for (p = 0; p < df->num_problems_defined; p++) { struct dataflow *dflow = df->problems_in_order[p]; @@ -516,7 +517,7 @@ df_set_blocks (bitmap blocks) bitmap_iterator bi; unsigned int bb_index; - EXECUTE_IF_SET_IN_BITMAP (diff, 0, bb_index, bi) + EXECUTE_IF_SET_IN_BITMAP (&diff, 0, bb_index, bi) { basic_block bb = BASIC_BLOCK (bb_index); if (bb) @@ -532,34 +533,34 @@ df_set_blocks (bitmap blocks) } } - BITMAP_FREE (diff); + bitmap_clear (&diff); } else { /* This block of code is executed to change the focus from the entire function to a subset. */ - bitmap blocks_to_reset = NULL; + bitmap_head blocks_to_reset; + bool initialized = false; int p; for (p = 0; p < df->num_problems_defined; p++) { struct dataflow *dflow = df->problems_in_order[p]; if (dflow->optional_p && dflow->problem->reset_fun) { - if (!blocks_to_reset) + if (!initialized) { basic_block bb; - blocks_to_reset = - BITMAP_ALLOC (&df_bitmap_obstack); + bitmap_initialize (&blocks_to_reset, &df_bitmap_obstack); FOR_ALL_BB(bb) { - bitmap_set_bit (blocks_to_reset, bb->index); + bitmap_set_bit (&blocks_to_reset, bb->index); } } - dflow->problem->reset_fun (blocks_to_reset); + dflow->problem->reset_fun (&blocks_to_reset); } } - if (blocks_to_reset) - BITMAP_FREE (blocks_to_reset); + if (initialized) + bitmap_clear (&blocks_to_reset); df->blocks_to_analyze = BITMAP_ALLOC (&df_bitmap_obstack); } @@ -1401,9 +1402,10 @@ df_compact_blocks (void) basic_block bb; void **problem_temps; int size = last_basic_block * sizeof (void *); - bitmap tmp = BITMAP_ALLOC (&df_bitmap_obstack); + bitmap_head tmp; problem_temps = XNEWVAR (void *, size); + bitmap_initialize (&tmp, &df_bitmap_obstack); for (p = 0; p < df->num_problems_defined; p++) { struct dataflow *dflow = df->problems_in_order[p]; @@ -1412,17 +1414,17 @@ df_compact_blocks (void) dflow problem. */ if (dflow->out_of_date_transfer_functions) { - bitmap_copy (tmp, dflow->out_of_date_transfer_functions); + bitmap_copy (&tmp, dflow->out_of_date_transfer_functions); bitmap_clear (dflow->out_of_date_transfer_functions); - if (bitmap_bit_p (tmp, ENTRY_BLOCK)) + if (bitmap_bit_p (&tmp, ENTRY_BLOCK)) bitmap_set_bit (dflow->out_of_date_transfer_functions, ENTRY_BLOCK); - if (bitmap_bit_p (tmp, EXIT_BLOCK)) + if (bitmap_bit_p (&tmp, EXIT_BLOCK)) bitmap_set_bit (dflow->out_of_date_transfer_functions, EXIT_BLOCK); i = NUM_FIXED_BLOCKS; FOR_EACH_BB (bb) { - if (bitmap_bit_p (tmp, bb->index)) + if (bitmap_bit_p (&tmp, bb->index)) bitmap_set_bit (dflow->out_of_date_transfer_functions, i); i++; } @@ -1463,22 +1465,22 @@ df_compact_blocks (void) if (df->blocks_to_analyze) { - if (bitmap_bit_p (tmp, ENTRY_BLOCK)) + if (bitmap_bit_p (&tmp, ENTRY_BLOCK)) bitmap_set_bit (df->blocks_to_analyze, ENTRY_BLOCK); - if (bitmap_bit_p (tmp, EXIT_BLOCK)) + if (bitmap_bit_p (&tmp, EXIT_BLOCK)) bitmap_set_bit (df->blocks_to_analyze, EXIT_BLOCK); - bitmap_copy (tmp, df->blocks_to_analyze); + bitmap_copy (&tmp, df->blocks_to_analyze); bitmap_clear (df->blocks_to_analyze); i = NUM_FIXED_BLOCKS; FOR_EACH_BB (bb) { - if (bitmap_bit_p (tmp, bb->index)) + if (bitmap_bit_p (&tmp, bb->index)) bitmap_set_bit (df->blocks_to_analyze, i); i++; } } - BITMAP_FREE (tmp); + bitmap_clear (&tmp); free (problem_temps); |