GCC Middle and Back End API Reference
|
#include <hash-set.h>
Data Structures | |
class | iterator |
Public Types | |
typedef Traits::value_type | Key |
Public Member Functions | |
hash_set (size_t n=13, bool ggc=false CXX_MEM_STAT_INFO) | |
bool | add (const Key &k) |
bool | contains (const Key &k) |
void | remove (const Key &k) |
template<typename Arg , bool(*)(const typename Traits::value_type &, Arg) f> | |
void | traverse (Arg a) const |
size_t | elements () const |
void | empty () |
bool | is_empty () const |
iterator | begin () const |
iterator | end () const |
Static Public Member Functions | |
static hash_set * | create_ggc (size_t n) |
Private Attributes | |
hash_table< Traits, Lazy > | m_table |
Friends | |
template<typename T , typename U > | |
void | gt_ggc_mx (hash_set< T, false, U > *) |
template<typename T , typename U > | |
void | gt_pch_nx (hash_set< T, false, U > *) |
template<typename T , typename U > | |
void | gt_pch_nx (hash_set< T, false, U > *, gt_pointer_operator, void *) |
A type-safe hash set. Copyright (C) 2014-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Class hash_set is a hash-value based container for objects of KeyId type. KeyId may be a non-trivial (non-POD) type provided a suitabe Traits class. Default Traits specializations are provided for basic types such as integers, pointers, and std::pair. Inserted elements are value-initialized either to zero for POD types or by invoking their default ctor. Removed elements are destroyed by invoking their dtor. On hash_set destruction all elements are removed. Objects of hash_set type are copy-constructible but not assignable.
|
inlineexplicit |
References hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), gcc_checking_assert, ggc_alloc(), and hash_set< KeyId, Lazy, Traits >::m_table.
Referenced by nontrapping_dom_walker::add_or_mark_expr(), ipa_icf::sem_item::add_reference(), add_type_duplicate(), asan_expand_mark_ifn(), check_bool_pattern(), collect_subblocks(), compute_added_num_insns(), convert_local_reference_op(), debug_tree_chain(), DFS::DFS(), dump_callgraph_transformation(), execute_early_expand_coro_ifns(), expand_stack_vars(), find_comparison_args(), ana::exploded_graph::find_previous_entry_to(), find_uninit_use(), flatten_remove_node_hook(), form_subloop(), get_odr_type(), get_vectype_for_scalar_type(), gimplify_decl_expr(), go_format_type(), go_output_typedef(), go_output_var(), diagnostic_context::includes_seen_p(), sarif_builder::make_reporting_descriptor_reference_object_for_cwe_id(), sarif_builder::make_result_object(), mark_addressable_1(), ipa_param_body_adjustments::mark_clobbers_dead(), ipa_param_body_adjustments::mark_dead_statements(), sarif_builder::maybe_make_physical_location_object(), merge_latch_edges(), omp_firstprivatize_type_sizes(), ana::uncertainty_t::on_maybe_bound_sval(), ana::uncertainty_t::on_mutable_sval_at_unknown_call(), predicate_statements(), print_node(), propagate_threaded_block_debug_into(), prune_predictions_for_bb(), ipa_icf::sem_item_optimizer::remove_symtab_node(), update_counts_for_self_gen_clones(), used_types_insert_helper(), vect_analyze_data_ref_accesses(), vect_record_loop_mask(), vect_slp_analyze_operations(), vectorizable_operation(), vectorizable_simd_clone_call(), verify_gimple_in_cfg(), cgraph_node::verify_node(), walk_tree_1(), and write_symbol().
References hash_table< Descriptor, Lazy, Allocator >::begin(), and hash_set< KeyId, Lazy, Traits >::m_table.
Referenced by ana::uncertainty_t::begin_maybe_bound_svals(), ana::reachable_regions::begin_mutable_svals(), ana::reachable_regions::begin_reachable_svals(), debug_helper(), execute_sm_if_changed(), vect_analyze_data_ref_accesses(), and vect_chooses_same_modes_p().
References hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), hash_table< Descriptor, Lazy, Allocator >::find_with_hash(), ggc_alloc(), hash_set< KeyId, Lazy, Traits >::m_table, and NULL.
Referenced by adjust_clone_incoming_counts(), analyze_clone_icoming_counts(), asan_emit_stack_protection(), check_bool_pattern(), compute_added_num_insns(), DFS::DFS_write_tree(), execute_early_expand_coro_ifns(), expand_stack_vars(), ipa_icf::sem_item_optimizer::filter_removed_items(), gimplify_bind_expr(), gimplify_expr(), go_output_typedef(), go_output_var(), has_undefined_value_p(), is_group(), sarif_builder::make_result_object(), mfb_redirect_edges_in_set(), ipa_param_body_adjustments::modify_call_stmt(), not_removed_prediction_p(), ipa_param_body_adjustments::prepare_debug_expressions(), prepare_vec_mask(), print_node(), cgraph_node::remove(), ana::uncertainty_t::unknown_sm_state_p(), update_counts_for_self_gen_clones(), value_available_p(), vect_slp_analyze_operations(), vectorizable_condition(), vectorizable_operation(), verify_location(), and cgraph_node::verify_node().
References ggc_alloc().
Referenced by used_types_insert_helper().
References hash_table< Descriptor, Lazy, Allocator >::empty(), and hash_set< KeyId, Lazy, Traits >::m_table.
Referenced by predicate_statements(), and rewrite_to_non_trapping_overflow().
References hash_table< Descriptor, Lazy, Allocator >::end(), and hash_set< KeyId, Lazy, Traits >::m_table.
Referenced by debug_helper(), ana::uncertainty_t::end_maybe_bound_svals(), ana::reachable_regions::end_mutable_svals(), ana::reachable_regions::end_reachable_svals(), execute_sm_if_changed(), vect_analyze_data_ref_accesses(), and vect_chooses_same_modes_p().
Referenced by hash_set< KeyId, Lazy, Traits >::add(), hash_set< KeyId, Lazy, Traits >::begin(), hash_set< KeyId, Lazy, Traits >::contains(), hash_set< KeyId, Lazy, Traits >::elements(), hash_set< KeyId, Lazy, Traits >::empty(), hash_set< KeyId, Lazy, Traits >::end(), hash_set< KeyId, Lazy, Traits >::is_empty(), hash_set< KeyId, Lazy, Traits >::remove(), and hash_set< KeyId, Lazy, Traits >::traverse().