summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-01-11 20:18:57 -0500
committerTrevor Saunders <tsaunders@mozilla.com>2014-02-18 22:44:38 -0500
commit86214b9a050115591b0fe55caa3eb1c2a409f5da (patch)
tree7eb671e19aa40026c3b600e039d38635b0dadc74
parent8718182882a6df154f61018b8800f039c650ff85 (diff)
downloadgcc-86214b9a050115591b0fe55caa3eb1c2a409f5da.tar.gz
bitmap_empty_p -> bitmap_head::is_empty
-rw-r--r--gcc/bb-reorder.c2
-rw-r--r--gcc/bitmap.c18
-rw-r--r--gcc/bitmap.h9
-rw-r--r--gcc/cfgexpand.c3
-rw-r--r--gcc/cgraphclones.c2
-rw-r--r--gcc/dce.c6
-rw-r--r--gcc/df-core.c2
-rw-r--r--gcc/df-problems.c4
-rw-r--r--gcc/dse.c4
-rw-r--r--gcc/function.c8
-rw-r--r--gcc/gimple-pretty-print.c2
-rw-r--r--gcc/ifcvt.c2
-rw-r--r--gcc/ipa-reference.c8
-rw-r--r--gcc/ipa-split.c4
-rw-r--r--gcc/ira.c2
-rw-r--r--gcc/lower-subreg.c4
-rw-r--r--gcc/lra-assigns.c2
-rw-r--r--gcc/lra-coalesce.c2
-rw-r--r--gcc/lra-constraints.c4
-rw-r--r--gcc/lra-eliminations.c2
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/sel-sched.c4
-rw-r--r--gcc/trans-mem.c2
-rw-r--r--gcc/tree-cfgcleanup.c2
-rw-r--r--gcc/tree-into-ssa.c12
-rw-r--r--gcc/tree-object-size.c2
-rw-r--r--gcc/tree-ssa-coalesce.c2
-rw-r--r--gcc/tree-ssa-dom.c6
-rw-r--r--gcc/tree-ssa-dse.c2
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c4
-rw-r--r--gcc/tree-ssa-loop-manip.c2
-rw-r--r--gcc/tree-ssa-pre.c8
-rw-r--r--gcc/tree-ssa-structalias.c20
-rw-r--r--gcc/tree-ssa-ter.c10
-rw-r--r--gcc/tree-ssa.c4
-rw-r--r--gcc/tree-stdarg.c2
-rw-r--r--gcc/tree-vrp.c8
37 files changed, 89 insertions, 93 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index ac4ff7a430d..fc9bec5619b 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2456,7 +2456,7 @@ duplicate_computed_gotos (void)
}
/* Nothing to do if there is no computed jump here. */
- if (bitmap_empty_p (&candidates))
+ if (candidates.is_empty ())
goto done;
/* Duplicate computed gotos. */
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 9b866d552fa..bf2341d4910 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -764,7 +764,7 @@ bitmap_single_bit_set_p (const_bitmap a)
const bitmap_element *elt;
unsigned ix;
- if (bitmap_empty_p (a))
+ if (a->is_empty ())
return false;
elt = a->first;
@@ -1052,7 +1052,7 @@ bitmap_and_compl (bitmap dst, const_bitmap a, const_bitmap b)
if (a == b)
{
- changed = !bitmap_empty_p (dst);
+ changed = !dst->is_empty ();
bitmap_clear (dst);
return changed;
}
@@ -1161,7 +1161,7 @@ bitmap_and_compl_into (bitmap a, const_bitmap b)
if (a == b)
{
- if (bitmap_empty_p (a))
+ if (a->is_empty ())
return false;
else
{
@@ -1441,12 +1441,12 @@ bitmap_compl_and_into (bitmap a, const_bitmap b)
gcc_assert (a != b);
- if (bitmap_empty_p (a))
+ if (a->is_empty ())
{
bitmap_copy (a, b);
return;
}
- if (bitmap_empty_p (b))
+ if (b->is_empty ())
{
bitmap_clear (a);
return;
@@ -1875,16 +1875,16 @@ bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b, const_bitmap k
gcc_assert (dst != a && dst != b && dst != kill);
/* Special cases. We don't bother checking for bitmap_equal_p (b, kill). */
- if (b == kill || bitmap_empty_p (b))
+ if (b == kill || b->is_empty ())
{
changed = !bitmap_equal_p (dst, a);
if (changed)
bitmap_copy (dst, a);
return changed;
}
- if (bitmap_empty_p (kill))
+ if (kill->is_empty ())
return bitmap_ior (dst, a, b);
- if (bitmap_empty_p (a))
+ if (a->is_empty ())
return bitmap_and_compl (dst, b, kill);
while (a_elt || b_elt)
@@ -1994,7 +1994,7 @@ bitmap_ior_and_into (bitmap a, const_bitmap b, const_bitmap c)
if (b == c)
return bitmap_ior_into (a, b);
- if (bitmap_empty_p (b) || bitmap_empty_p (c))
+ if (b->is_empty () || c->is_empty ())
return false;
and_elt.indx = -1;
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index dc7dd92f778..b48a58c8aa2 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -210,6 +210,9 @@ struct GTY(()) bitmap_head {
/* Count the number of bits set in the bitmap. */
unsigned long count_bits () const;
+/* True if the bitmap has only a single bit set. */
+ bool is_empty () const { return !first; }
+
unsigned first_set_bit () const;
unsigned last_set_bit () const;
@@ -246,12 +249,6 @@ extern bool bitmap_equal_p (const_bitmap, const_bitmap);
extern bool bitmap_intersect_compl_p (const_bitmap, const_bitmap);
/* True if MAP is an empty bitmap. */
-inline bool bitmap_empty_p (const_bitmap map)
-{
- return !map->first;
-}
-
-/* True if the bitmap has only a single bit set. */
extern bool bitmap_single_bit_set_p (const_bitmap);
/* Boolean operations on bitmaps. The _into variants are two operand
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index bda620331a2..842f6f3fd33 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -616,8 +616,7 @@ add_partitioned_vars_to_ptset (struct pt_solution *pt,
&& (part = (bitmap *) pointer_map_contains (decls_to_partitions,
(void *)(size_t) i)))
bitmap_ior_into (temp, *part);
- if (!bitmap_empty_p (temp))
- bitmap_ior_into (pt->vars, temp);
+ bitmap_ior_into (pt->vars, temp);
}
/* Update points-to sets based on partition info, so we can use them on RTL.
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index fe525ff408f..ff5a1cfb50e 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -385,7 +385,7 @@ build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
/* When signature changes, we need to clear builtin info. */
if (DECL_BUILT_IN (new_decl)
&& args_to_skip
- && !bitmap_empty_p (args_to_skip))
+ && !args_to_skip->is_empty ())
{
DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
diff --git a/gcc/dce.c b/gcc/dce.c
index 332cc57fe85..9501b6fdf54 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -474,7 +474,7 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast,
else
arg_stores->set_bit (INSN_UID (insn));
- if (bitmap_empty_p (&sp_bytes))
+ if (sp_bytes.is_empty ())
{
ret = true;
break;
@@ -894,7 +894,7 @@ word_dce_process_block (basic_block bb, bool redo_out,
insns. We may have to emit a debug temp even if the insn
was marked, in case the debug use was after the point of
death. */
- if (debug.used && !bitmap_empty_p (debug.used))
+ if (debug.used && !debug.used->is_empty ())
{
df_ref *def_rec;
@@ -999,7 +999,7 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au,
insns. We may have to emit a debug temp even if the insn
was marked, in case the debug use was after the point of
death. */
- if (debug.used && !bitmap_empty_p (debug.used))
+ if (debug.used && !debug.used->is_empty ())
for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
dead_debug_insert_temp (&debug, DF_REF_REGNO (*def_rec), insn,
needed && !control_flow_insn_p (insn)
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 26ae4634197..ba5f979d44a 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -1045,7 +1045,7 @@ df_worklist_dataflow_doublequeue (struct dataflow *dataflow,
/* Double-queueing. Worklist is for the current iteration,
and pending is for the next. */
- while (!bitmap_empty_p (pending))
+ while (!pending->is_empty ())
{
bitmap_iterator bi;
unsigned int index;
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 242dbca3551..34deb15f544 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -505,7 +505,7 @@ df_rd_transfer_function (int bb_index)
bitmap sparse_kill = &bb_info->sparse_kill;
bool changed = false;
- if (bitmap_empty_p (sparse_kill))
+ if (sparse_kill->is_empty ())
changed = bitmap_ior_and_compl (out, gen, in, kill);
else
{
@@ -621,7 +621,7 @@ df_rd_dump_defs_set (bitmap defs_set, const char *prefix, FILE *file)
continue;
tmp.set_range (DF_DEFS_BEGIN (regno), DF_DEFS_COUNT (regno));
bitmap_and_into (&tmp, defs_set);
- if (! bitmap_empty_p (&tmp))
+ if (! tmp.is_empty ())
{
bitmap_iterator bi;
unsigned int ix;
diff --git a/gcc/dse.c b/gcc/dse.c
index c421526158b..51fc6acc15d 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -2016,7 +2016,7 @@ replace_read (store_info_t store_info, insn_info_t store_insn,
note_stores (PATTERN (this_insn), look_for_hardregs, &regs_set);
bitmap_and_into (&regs_set, regs_live);
- if (!bitmap_empty_p (&regs_set))
+ if (!regs_set.is_empty ())
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
@@ -3519,7 +3519,7 @@ dse_step5_nospill (void)
if (insn_info->insn
&& INSN_P (insn_info->insn)
&& (!insn_info->cannot_delete)
- && (!bitmap_empty_p (v)))
+ && (!v->is_empty ()))
{
store_info_t store_info = insn_info->store_rec;
diff --git a/gcc/function.c b/gcc/function.c
index 3a284db3ef9..d8aa35ce410 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4031,7 +4031,7 @@ generate_setjmp_warnings (void)
bitmap setjmp_crosses = regstat_get_setjmp_crosses ();
if (n_basic_blocks_for_fn (cfun) == NUM_FIXED_BLOCKS
- || bitmap_empty_p (setjmp_crosses))
+ || setjmp_crosses->is_empty ())
return;
setjmp_vars_warning (setjmp_crosses, DECL_INITIAL (current_function_decl));
@@ -6196,7 +6196,7 @@ thread_prologue_and_epilogue_insns (void)
/* Find tail blocks reachable from both blocks needing a
prologue and blocks not needing a prologue. */
- if (!bitmap_empty_p (&bb_tail))
+ if (!bb_tail.is_empty ())
FOR_EACH_BB_FN (bb, cfun)
{
bool some_pro, some_no_pro;
@@ -6230,7 +6230,7 @@ thread_prologue_and_epilogue_insns (void)
}
}
/* Now duplicate the tails. */
- if (!bitmap_empty_p (&bb_tail))
+ if (!bb_tail.is_empty ())
FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
basic_block copy_bb, tbb;
@@ -6294,7 +6294,7 @@ thread_prologue_and_epilogue_insns (void)
/* verify_flow_info doesn't like a note after a
sibling call. */
delete_insn (insert_point);
- if (bitmap_empty_p (&bb_tail))
+ if (bb_tail.is_empty ())
break;
}
}
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 2d1e1c707e9..fd6683fd5a3 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -611,7 +611,7 @@ pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
if (pt->null)
pp_string (buffer, "null ");
if (pt->vars
- && !bitmap_empty_p (pt->vars))
+ && !pt->vars->is_empty ())
{
bitmap_iterator bi;
unsigned i;
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 9e1f826cf6d..b8f4423d9c4 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -4250,7 +4250,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
df_get_live_out (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
bitmap_and_into (&return_regs,
df_get_live_in (EXIT_BLOCK_PTR_FOR_FN (cfun)));
- if (!bitmap_empty_p (&return_regs))
+ if (!return_regs.is_empty ())
{
FOR_BB_INSNS_REVERSE (new_dest, insn)
if (NONDEBUG_INSN_P (insn))
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 9b932dac0b9..e07601bdbc6 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -844,7 +844,7 @@ propagate (void)
/* Create the complimentary sets. */
- if (bitmap_empty_p (node_g->statics_read))
+ if (node_g->statics_read->is_empty ())
opt->statics_not_read = all_module_statics;
else
{
@@ -856,7 +856,7 @@ propagate (void)
node_g->statics_read);
}
- if (bitmap_empty_p (node_g->statics_written))
+ if (node_g->statics_written->is_empty ())
opt->statics_not_written = all_module_statics;
else
{
@@ -895,8 +895,8 @@ write_node_summary_p (struct cgraph_node *node,
if (!node->definition || node->global.inlined_to)
return false;
info = get_reference_optimization_summary (node);
- if (!info || (bitmap_empty_p (info->statics_not_read)
- && bitmap_empty_p (info->statics_not_written)))
+ if (!info || (info->statics_not_read->is_empty ()
+ && info->statics_not_written->is_empty ()))
return false;
/* See if we want to encode it.
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 368dffcbc05..b26152f1d61 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -528,7 +528,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
/* When there are non-ssa vars used in the split region, see if they
are used in the header region. If so, reject the split.
FIXME: we can use nested function support to access both. */
- if (!bitmap_empty_p (non_ssa_vars)
+ if (!non_ssa_vars->is_empty ()
&& !verify_non_ssa_vars (current, non_ssa_vars, return_bb))
{
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -539,7 +539,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
/* If the split point is dominated by a forbidden block, reject
the split. */
- if (!bitmap_empty_p (forbidden_dominators)
+ if (!forbidden_dominators->is_empty ()
&& dominated_by_forbidden (current->entry_bb))
{
if (dump_file && (dump_flags & TDF_DETAILS))
diff --git a/gcc/ira.c b/gcc/ira.c
index d47cbba9972..3592e5a7883 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3904,7 +3904,7 @@ update_equiv_regs (void)
}
}
- if (!bitmap_empty_p (&cleared_regs))
+ if (!cleared_regs.is_empty ())
{
FOR_EACH_BB_FN (bb, cfun)
{
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 40eaeec45d2..6b884c5e8a6 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -429,7 +429,7 @@ propagate_pseudo_copies (void)
bitmap_and_compl (&queue, &propagate, decomposable_context);
bitmap_ior_into (decomposable_context, &propagate);
}
- while (!bitmap_empty_p (&queue));
+ while (!queue.is_empty ());
}
/* A pointer to one of these values is passed to
@@ -1518,7 +1518,7 @@ decompose_multiword_subregs (bool decompose_copies)
}
bitmap_and_compl_into (decomposable_context, non_decomposable_context);
- if (!bitmap_empty_p (decomposable_context))
+ if (!decomposable_context->is_empty ())
{
sbitmap sub_blocks;
unsigned int i;
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index 2c5b4ec027d..583ed07e741 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -857,7 +857,7 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap)
{
if (try_hard_reg_pseudos_check[hard_regno + j] != curr_pseudo_check)
continue;
- lra_assert (!bitmap_empty_p (try_hard_reg_pseudos[hard_regno + j]));
+ lra_assert (!try_hard_reg_pseudos[hard_regno + j]->is_empty ());
bitmap_ior_into (&spill_pseudos_bitmap,
try_hard_reg_pseudos[hard_regno + j]);
}
diff --git a/gcc/lra-coalesce.c b/gcc/lra-coalesce.c
index 1ed0574add9..a1e921596bd 100644
--- a/gcc/lra-coalesce.c
+++ b/gcc/lra-coalesce.c
@@ -194,7 +194,7 @@ update_live_info (bitmap lr_bitmap)
EXECUTE_IF_AND_IN_BITMAP (&coalesced_pseudos_bitmap, lr_bitmap,
FIRST_PSEUDO_REGISTER, j, bi)
used_pseudos_bitmap.set_bit (first_coalesced_pseudo[j]);
- if (! bitmap_empty_p (&used_pseudos_bitmap))
+ if (! used_pseudos_bitmap.is_empty ())
{
bitmap_and_compl_into (lr_bitmap, &coalesced_pseudos_bitmap);
bitmap_ior_into (lr_bitmap, &used_pseudos_bitmap);
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 0fc64eaa43a..9facc54f17d 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -5560,7 +5560,7 @@ remove_inheritance_pseudos (bitmap remove_pseudos)
rtx set, prev_set, prev_insn;
bool change_p, done_p;
- change_p = ! bitmap_empty_p (remove_pseudos);
+ change_p = ! remove_pseudos->is_empty ();
/* We can not finish the function right away if CHANGE_P is true
because we need to marks insns affected by previous
inheritance/split pass for processing by the subsequent
@@ -5761,7 +5761,7 @@ undo_optional_reloads (void)
fprintf (lra_dump_file, "Keep optional reload reg %d\n", regno);
}
}
- change_p = ! bitmap_empty_p (&removed_optional_reload_pseudos);
+ change_p = ! removed_optional_reload_pseudos.is_empty ();
EXECUTE_IF_SET_IN_BITMAP (&removed_optional_reload_pseudos, 0, regno, bi)
{
if (lra_dump_file != NULL)
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index 428dca2bd7c..b17f565f769 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -1370,7 +1370,7 @@ lra_eliminate (bool final_p, bool first_p)
{
#ifdef ENABLE_CHECKING
update_reg_eliminate (&insns_with_changed_offsets);
- if (! bitmap_empty_p (&insns_with_changed_offsets))
+ if (! insns_with_changed_offsets.is_empty ())
gcc_unreachable ();
#endif
/* We change eliminable hard registers in insns so we should do
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 60a9d9a6154..5c8a56d94bc 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1307,7 +1307,7 @@ reload (rtx first, int global)
substitute_stack.release ();
- gcc_assert (bitmap_empty_p (&spilled_pseudos));
+ gcc_assert (spilled_pseudos.is_empty ());
reload_completed = !failure;
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 84beb447c38..96b2e872e3f 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -1683,8 +1683,8 @@ find_best_reg_for_expr (expr_t expr, blist_t bnds, bool *is_orig_reg_p)
*is_orig_reg_p = false;
/* Don't bother to do anything if this insn doesn't set any registers. */
- if (bitmap_empty_p (VINSN_REG_SETS (EXPR_VINSN (expr)))
- && bitmap_empty_p (VINSN_REG_CLOBBERS (EXPR_VINSN (expr))))
+ if (VINSN_REG_SETS (EXPR_VINSN (expr))->is_empty ()
+ && VINSN_REG_CLOBBERS (EXPR_VINSN (expr))->is_empty ())
return true;
used_regs = get_clear_regset_from_pool ();
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 711d738947c..8d39ff3992f 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -4561,7 +4561,7 @@ ipa_tm_scan_irr_function (struct cgraph_node *node, bool for_clone)
/* If we found any new irrevocable blocks, reduce the call count for
transactional clones within the irrevocable blocks. Save the new
set of irrevocable blocks for next time. */
- if (!bitmap_empty_p (new_irr))
+ if (!new_irr->is_empty ())
{
bitmap_iterator bmi;
unsigned i;
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 7cfeeff35b7..a9b9ab6874b 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -650,7 +650,7 @@ cleanup_tree_cfg_1 (void)
}
/* Now process the altered blocks, as long as any are available. */
- while (!bitmap_empty_p (cfgcleanup_altered_bbs))
+ while (!cfgcleanup_altered_bbs->is_empty ())
{
i = cfgcleanup_altered_bbs->first_set_bit ();
cfgcleanup_altered_bbs->clear_bit (i);
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 051b4efa555..d29b9d406fe 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -776,7 +776,7 @@ prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
struct dom_dfsnum *defs;
unsigned n_defs, adef;
- if (bitmap_empty_p (uses))
+ if (uses->is_empty ())
{
bitmap_clear (phis);
return;
@@ -787,7 +787,7 @@ prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
bitmap_head to_remove;
bitmap_and_compl (&to_remove, kills, uses);
bitmap_and_compl_into (phis, &to_remove);
- if (bitmap_empty_p (phis))
+ if (phis->is_empty ())
return;
/* We want to remove the unnecessary phi nodes, but we do not want to compute
@@ -2724,14 +2724,14 @@ dump_update_ssa (FILE *file)
dump_names_replaced_by (file, ssa_name (i));
}
- if (symbols_to_rename_set && !bitmap_empty_p (symbols_to_rename_set))
+ if (symbols_to_rename_set && !symbols_to_rename_set->is_empty ())
{
fprintf (file, "\nSymbols to be put in SSA form\n");
dump_decl_set (file, symbols_to_rename_set);
fprintf (file, "\n");
}
- if (names_to_release && !bitmap_empty_p (names_to_release))
+ if (names_to_release && !names_to_release->is_empty ())
{
fprintf (file, "\nSSA names to release after updating the SSA web\n\n");
EXECUTE_IF_SET_IN_BITMAP (names_to_release, 0, i, bi)
@@ -2994,7 +2994,7 @@ insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks,
db = find_def_blocks_for (var);
/* No need to do anything if there were no definitions to VAR. */
- if (db == NULL || bitmap_empty_p (db->def_blocks))
+ if (db == NULL || db->def_blocks->is_empty ())
return;
/* Compute the initial iterated dominance frontier. */
@@ -3032,7 +3032,7 @@ insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks,
bitmap_copy (&pruned_idf, idf);
}
- if (!bitmap_empty_p (&pruned_idf))
+ if (!pruned_idf.is_empty ())
{
/* Make sure that PRUNED_IDF blocks and all their feeding blocks
are included in the region to be updated. The feeding blocks
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 7e263cbf498..64f6e8305e7 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -541,7 +541,7 @@ compute_builtin_object_size (tree ptr, int object_size_type)
/* Second pass: keep recomputing object sizes of variables
that need reexamination, until no object sizes are
increased or all object sizes are computed. */
- if (! bitmap_empty_p (&osi.reexamine))
+ if (! osi.reexamine.is_empty ())
{
bitmap_head reexamine;
diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c
index bae20d32b92..09be134431e 100644
--- a/gcc/tree-ssa-coalesce.c
+++ b/gcc/tree-ssa-coalesce.c
@@ -676,7 +676,7 @@ live_track_remove_partition (live_track_p ptr, int partition)
root = basevar_index (ptr->map, partition);
ptr->live_base_partitions[root]->clear_bit (partition);
/* If the element list is empty, make the base variable not live either. */
- if (bitmap_empty_p (ptr->live_base_partitions[root]))
+ if (ptr->live_base_partitions[root]->is_empty ())
ptr->live_base_var->clear_bit (root);
}
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 16a06aa3918..04b55c5c835 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -890,7 +890,7 @@ tree_ssa_dominator_optimize (void)
/* Removal of statements may make some EH edges dead. Purge
such edges from the CFG as needed. */
- if (!bitmap_empty_p (need_eh_cleanup))
+ if (!need_eh_cleanup->is_empty ())
{
unsigned i;
bitmap_iterator bi;
@@ -3063,7 +3063,7 @@ eliminate_degenerate_phis (void)
as trivial copies or constant initializations identified by
the first phase or this phase. Basically we keep iterating
until our set of INTERESTING_NAMEs is empty. */
- while (!bitmap_empty_p (&interesting_names))
+ while (!interesting_names.is_empty ())
{
unsigned int i;
bitmap_iterator bi;
@@ -3095,7 +3095,7 @@ eliminate_degenerate_phis (void)
/* Propagation of const and copies may make some EH edges dead. Purge
such edges from the CFG as needed. */
- if (!bitmap_empty_p (need_eh_cleanup))
+ if (!need_eh_cleanup->is_empty ())
{
gimple_purge_all_dead_eh_edges (need_eh_cleanup);
BITMAP_FREE (need_eh_cleanup);
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index ac9b95a2554..6d114e12fcd 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -350,7 +350,7 @@ tree_ssa_dse (void)
/* Removal of stores may make some EH edges dead. Purge such edges from
the CFG as needed. */
- if (!bitmap_empty_p (need_eh_cleanup))
+ if (!need_eh_cleanup->is_empty ())
{
gimple_purge_all_dead_eh_edges (need_eh_cleanup);
cleanup_tree_cfg ();
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 05cf3d91ed3..c20ba7fc3e9 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -1014,7 +1014,7 @@ canonicalize_induction_variables (void)
evaluation could reveal new information. */
scev_reset ();
- if (!bitmap_empty_p (&loop_closed_ssa_invalidated))
+ if (!loop_closed_ssa_invalidated.is_empty ())
{
gcc_checking_assert (loops_state_satisfies_p (LOOP_CLOSED_SSA));
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
@@ -1205,7 +1205,7 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
/* We can not use TODO_update_ssa_no_phi because VOPS gets confused. */
if (loop_closed_ssa_invalidated
- && !bitmap_empty_p (loop_closed_ssa_invalidated))
+ && !loop_closed_ssa_invalidated->is_empty ())
rewrite_into_loop_closed_ssa (loop_closed_ssa_invalidated,
TODO_update_ssa);
else
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 000843b0559..fc81ef59228 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -524,7 +524,7 @@ rewrite_into_loop_closed_ssa (bitmap changed_bbs, unsigned update_flag)
/* Find the uses outside loops. */
find_uses_to_rename (changed_bbs, use_blocks, names_to_rename);
- if (!bitmap_empty_p (names_to_rename))
+ if (!names_to_rename->is_empty ())
{
/* An array of bitmaps where LOOP_EXITS[I] is the set of basic blocks
that are the destination of an edge exiting loop number I. */
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 7aa26448187..ad3b95a027d 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -816,7 +816,7 @@ bitmap_set_contains_value (bitmap_set_t set, unsigned int value_id)
if (value_id_constant_p (value_id))
return true;
- if (!set || bitmap_empty_p (&set->expressions))
+ if (!set || set->expressions.is_empty ())
return false;
return bitmap_bit_p (&set->values, value_id);
@@ -4488,8 +4488,8 @@ eliminate (void)
static unsigned
fini_eliminate (void)
{
- bool do_eh_cleanup = !bitmap_empty_p (need_eh_cleanup);
- bool do_ab_cleanup = !bitmap_empty_p (need_ab_cleanup);
+ bool do_eh_cleanup = !need_eh_cleanup->is_empty ();
+ bool do_ab_cleanup = !need_ab_cleanup->is_empty ();
if (do_eh_cleanup)
gimple_purge_all_dead_eh_edges (need_eh_cleanup);
@@ -4553,7 +4553,7 @@ remove_dead_inserted_code (void)
if (gimple_plf (t, NECESSARY))
worklist.set_bit (i);
}
- while (!bitmap_empty_p (&worklist))
+ while (!worklist.is_empty ())
{
i = worklist.first_set_bit ();
worklist.clear_bit (i);
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 8f0c707cac0..6774fc035ed 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2174,7 +2174,7 @@ label_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
return;
}
- if (!bitmap_empty_p (graph->points_to[n]))
+ if (!graph->points_to[n]->is_empty ())
{
equiv_class_label_t ecl;
ecl = equiv_class_lookup_or_add (pointer_equiv_class_table,
@@ -2221,7 +2221,7 @@ dump_pred_graph (struct scc_info *si, FILE *file)
else
fprintf (file, "\"*%s\"", get_varinfo (i - FIRST_REF_NODE)->name);
if (graph->points_to[i]
- && !bitmap_empty_p (graph->points_to[i]))
+ && !graph->points_to[i]->is_empty ())
{
fprintf (file, "[label=\"%s = {", get_varinfo (i)->name);
unsigned j;
@@ -2589,7 +2589,7 @@ static bool
eliminate_indirect_cycles (unsigned int node)
{
if (graph->indirect_cycles[node] != -1
- && !bitmap_empty_p (get_varinfo (node)->solution))
+ && !get_varinfo (node)->solution->is_empty ())
{
unsigned int i;
auto_vec<unsigned> queue;
@@ -2640,8 +2640,8 @@ solve_graph (constraint_graph_t graph)
for (i = 1; i < size; i++)
{
varinfo_t ivi = get_varinfo (i);
- if (find (i) == i && !bitmap_empty_p (ivi->solution)
- && ((graph->succs[i] && !bitmap_empty_p (graph->succs[i]))
+ if (find (i) == i && !ivi->solution->is_empty ()
+ && ((graph->succs[i] && !graph->succs[i]->is_empty ())
|| graph->complex[i].length () > 0))
changed->set_bit (i);
}
@@ -2649,7 +2649,7 @@ solve_graph (constraint_graph_t graph)
/* Allocate a bitmap to be used to store the changed bits. */
bitmap_head pts (&pta_obstack);
- while (!bitmap_empty_p (changed))
+ while (!changed->is_empty ())
{
unsigned int i;
struct topo_info *ti = init_topo_info ();
@@ -2701,7 +2701,7 @@ solve_graph (constraint_graph_t graph)
else
bitmap_copy (&pts, vi->solution);
- if (bitmap_empty_p (&pts))
+ if (pts.is_empty ())
continue;
if (vi->oldsolution)
@@ -2713,7 +2713,7 @@ solve_graph (constraint_graph_t graph)
}
solution = vi->solution;
- solution_empty = bitmap_empty_p (solution);
+ solution_empty = solution->is_empty ();
/* Process the complex constraints */
bitmap expanded_pts = NULL;
@@ -2735,7 +2735,7 @@ solve_graph (constraint_graph_t graph)
}
BITMAP_FREE (expanded_pts);
- solution_empty = bitmap_empty_p (solution);
+ solution_empty = solution->is_empty ();
if (!solution_empty)
{
@@ -6255,7 +6255,7 @@ pt_solution_empty_p (struct pt_solution *pt)
return false;
if (pt->vars
- && !bitmap_empty_p (pt->vars))
+ && !pt->vars->is_empty ())
return false;
/* If the solution includes ESCAPED, check if that is empty. */
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index a4f347721d2..db65319c1b2 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -313,7 +313,7 @@ remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version)
{
gcc_checking_assert (tab->kill_list[p]);
tab->kill_list[p]->clear_bit (version);
- if (bitmap_empty_p (tab->kill_list[p]))
+ if (tab->kill_list[p]->is_empty ())
{
tab->partition_in_use->clear_bit (p);
BITMAP_FREE (tab->kill_list[p]);
@@ -336,7 +336,7 @@ add_dependence (temp_expr_table_p tab, int version, tree var)
i = SSA_NAME_VERSION (var);
if (version_to_be_replaced_p (tab, i))
{
- if (!bitmap_empty_p (tab->new_replaceable_dependencies))
+ if (!tab->new_replaceable_dependencies->is_empty ())
{
/* Version will now be killed by a write to any partition the
substituted expression would have been killed by. */
@@ -618,7 +618,7 @@ find_replaceable_in_bb (temp_expr_table_p tab, basic_block bb)
/* See if the root variables are the same. If they are, we
do not want to do the replacement to avoid problems with
code size, see PR tree-optimization/17549. */
- if (!bitmap_empty_p (vars))
+ if (!vars->is_empty ())
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter2, SSA_OP_DEF)
{
if (SSA_NAME_VAR (def)
@@ -731,7 +731,7 @@ find_replaceable_exprs (var_map map)
FOR_EACH_BB_FN (bb, cfun)
{
find_replaceable_in_bb (table, bb);
- gcc_checking_assert (bitmap_empty_p (table->partition_in_use));
+ gcc_checking_assert (table->partition_in_use->is_empty ());
}
ret = free_temp_expr_table (table);
bitmap_obstack_release (&ter_bitmap_obstack);
@@ -783,7 +783,7 @@ debug_ter (FILE *f, temp_expr_table_p t)
print_generic_expr (f, ssa_name (x), TDF_SLIM);
fprintf (f, " dep-parts : ");
if (t->partition_dependencies[x]
- && !bitmap_empty_p (t->partition_dependencies[x]))
+ && !t->partition_dependencies[x]->is_empty ())
{
EXECUTE_IF_SET_IN_BITMAP (t->partition_dependencies[x], 0, y, bi)
fprintf (f, "P%d ",y);
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index d494080bbc5..7c7d51af93c 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -604,7 +604,7 @@ release_defs_bitset (bitmap toremove)
/* Performing a topological sort is probably overkill, this will
most likely run in slightly superlinear time, rather than the
pathological quadratic worst case. */
- while (!bitmap_empty_p (toremove))
+ while (!toremove->is_empty ())
EXECUTE_IF_SET_IN_BITMAP (toremove, 0, j, bi)
{
bool remove_now = true;
@@ -1553,7 +1553,7 @@ execute_update_addresses_taken (void)
/* Operand caches need to be recomputed for operands referencing the updated
variables and operands need to be rewritten to expose bare symbols. */
- if (!bitmap_empty_p (&suitable_for_renaming))
+ if (!suitable_for_renaming.is_empty ())
{
FOR_EACH_BB_FN (bb, cfun)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi);)
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index dddb83e3ff4..e90545d93d5 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -967,7 +967,7 @@ execute_optimize_stdarg (void)
if (! va_list_escapes
&& va_list_simple_ptr
- && ! bitmap_empty_p (si.va_list_escape_vars)
+ && ! si.va_list_escape_vars->is_empty ()
&& check_all_va_list_escapes (&si))
va_list_escapes = true;
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index fbca63ae43b..3aaa00613ed 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -459,7 +459,7 @@ set_value_range (value_range_t *vr, enum value_range_type t, tree min,
gcc_assert (min == NULL_TREE && max == NULL_TREE);
if (t == VR_UNDEFINED || t == VR_VARYING)
- gcc_assert (equiv == NULL || bitmap_empty_p (equiv));
+ gcc_assert (equiv == NULL || equiv->is_empty ());
#endif
vr->type = t;
@@ -474,7 +474,7 @@ set_value_range (value_range_t *vr, enum value_range_type t, tree min,
if (equiv != vr->equiv)
{
- if (equiv && !bitmap_empty_p (equiv))
+ if (equiv && !equiv->is_empty ())
bitmap_copy (vr->equiv, equiv);
else
bitmap_clear (vr->equiv);
@@ -801,8 +801,8 @@ static inline bool
vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2)
{
return (b1 == b2
- || ((!b1 || bitmap_empty_p (b1))
- && (!b2 || bitmap_empty_p (b2)))
+ || ((!b1 || b1->is_empty ())
+ && (!b2 || b2->is_empty ()))
|| (b1 && b2
&& bitmap_equal_p (b1, b2)));
}