diff options
author | Martin Liska <mliska@suse.cz> | 2019-05-03 14:37:22 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-05-03 12:37:22 +0000 |
commit | b119c05542a9574a1c27f9bba63efbafc12b248b (patch) | |
tree | c74567ce247b0b3ab51c2b111256694ba980a0b5 /gcc/postreload-gcse.c | |
parent | 3353ebf0d9a20f07597b90943664f10557488ea8 (diff) | |
download | gcc-b119c05542a9574a1c27f9bba63efbafc12b248b.zip gcc-b119c05542a9574a1c27f9bba63efbafc12b248b.tar.gz gcc-b119c05542a9574a1c27f9bba63efbafc12b248b.tar.bz2 |
Come up with is_empty for hash_{table,map,set}.
2019-05-03 Martin Liska <mliska@suse.cz>
* hash-map.h: Add is_empty function.
* hash-set.h: Likewise.
* hash-table.h: Likewise.
* dwarf2out.c (dwarf2out_finish): Use is_empty instead of
elements () == 0 (and similar usages).
* gimple-ssa-store-merging.c (pass_store_merging::terminate_and_process_all_chains): Likewise.
* gimplify.c (gimplify_bind_expr): Likewise.
(gimplify_switch_expr): Likewise.
* hash-map-tests.c (test_map_of_strings_to_int): Likewise.
* ipa-icf.c (sem_item_optimizer::remove_symtab_node): Likewise.
* postreload-gcse.c (dump_hash_table): Likewise.
(gcse_after_reload_main): Likewise.
* predict.c (combine_predictions_for_bb): Likewise.
* tree-parloops.c (reduction_phi): Likewise.
(separate_decls_in_region): Likewise.
(transform_to_exit_first_loop): Likewise.
(gen_parallel_loop): Likewise.
(gather_scalar_reductions): Likewise.
(try_create_reduction_list): Likewise.
* var-tracking.c (dump_vars): Likewise.
(emit_notes_for_changes): Likewise.
(vt_emit_notes): Likewise.
2019-05-03 Martin Liska <mliska@suse.cz>
* call.c (build_aggr_conv): Use is_empty instead of
elements () == 0 (and similar usages).
* parser.c (cp_parser_lambda_introducer): Likewise.
From-SVN: r270851
Diffstat (limited to 'gcc/postreload-gcse.c')
-rw-r--r-- | gcc/postreload-gcse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index a165351..e473767 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -504,7 +504,7 @@ dump_hash_table (FILE *file) (long) expr_table->size (), (long) expr_table->elements (), expr_table->collisions ()); - if (expr_table->elements () > 0) + if (!expr_table->is_empty ()) { fprintf (file, "\n\ntable entries:\n"); expr_table->traverse <FILE *, dump_expr_hash_table_entry> (file); @@ -1386,7 +1386,7 @@ gcse_after_reload_main (rtx f ATTRIBUTE_UNUSED) if (dump_file) dump_hash_table (dump_file); - if (expr_table->elements () > 0) + if (!expr_table->is_empty ()) { /* Knowing which MEMs are transparent through a block can signifiantly increase the number of redundant loads found. So compute transparency |