GCC Middle and Back End API Reference
hash_set< KeyId, Lazy, Traits > Class Template Reference

#include <hash-set.h>

Inheritance diagram for hash_set< KeyId, Lazy, Traits >:
Collaboration diagram for hash_set< KeyId, Lazy, Traits >:

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_setcreate_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 *)
 

Detailed Description

template<typename KeyId, bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
class hash_set< KeyId, Lazy, Traits >
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.   

Member Typedef Documentation

◆ Key

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
typedef Traits::value_type hash_set< KeyId, Lazy, Traits >::Key

Constructor & Destructor Documentation

◆ hash_set()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
hash_set< KeyId, Lazy, Traits >::hash_set ( size_t n = 13,
bool ggc = false CXX_MEM_STAT_INFO )
inlineexplicit

Member Function Documentation

◆ add()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
bool hash_set< KeyId, Lazy, Traits >::add ( const Key & k)
inline

References hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), gcc_checking_assert, 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(), assemble_external(), branch_prob(), check_bool_pattern(), collect_subblocks(), combine_predictions_for_bb(), compute_added_num_insns(), compute_ltrans_boundary(), convert_local_reference_op(), debug_tree_chain(), ana::exploded_graph::detect_infinite_loops(), DFS::DFS(), dump_callgraph_transformation(), evaluate_control_stmt_using_entry_checks(), execute_early_expand_coro_ifns(), expand_stack_vars(), find_always_executed_bbs(), find_comparison_args(), find_control_dep_blocks(), find_gang_private_vars(), find_local_vars_to_propagate(), find_partitioned_var_uses_1(), ana::exploded_graph::find_previous_entry_to(), find_ssa_names_to_propagate(), find_uninit_use(), flatten_remove_node_hook(), form_subloop(), gen_phi_arg_condition(), get_odr_type(), get_vectype_for_scalar_type(), gimplify_decl_expr(), gimplify_omp_for(), go_format_type(), go_output_typedef(), go_output_var(), group_case_labels_stmt(), diagnostic_context::includes_seen_p(), ipa_devirt(), loc_descr_to_next_no_nop(), lower_eh_dispatch(), 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(), matching_alloc_calls_p(), maybe_lower_iteration_bound(), merge_latch_edges(), ipa_param_adjustments::modify_call(), need_cmov_or_rewire(), neuter_worker_single(), predicate::normalize(), oacc_resolve_clause_dependencies(), omp_firstprivatize_type_sizes(), ana::uncertainty_t::on_maybe_bound_sval(), ana::uncertainty_t::on_mutable_sval_at_unknown_call(), output_location(), possible_polymorphic_call_targets(), predicate_scalar_phi(), predicate_statements(), predict_loops(), print_node(), process_references(), value_topo_info< valtype >::propagate_effects(), propagate_threaded_block_debug_into(), prune_predictions_for_bb(), purge_all_uses(), push_to_worklist(), record_target_from_binfo(), record_targets_from_bases(), remove_cgraph_node_from_order(), ipa_icf::sem_item_optimizer::remove_symtab_node(), symbol_table::remove_unreachable_nodes(), symbol_table::remove_unreferenced_decls(), sccopy_propagate(), sccopy_visit_op(), should_duplicate_loop_header_p(), suggest_attribute(), type_internals_preclude_sra_p_1(), back_jt_path_registry::update_cfg(), update_counts_for_self_gen_clones(), used_types_insert_helper(), vect_analyze_data_ref_accesses(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_bb_vectorization_profitable_p(), vect_prologue_cost_for_slp(), vect_prune_runtime_alias_test_list(), vect_record_loop_mask(), vect_slp_analyze_load_dependences(), vect_slp_analyze_node_operations(), vect_slp_analyze_operations(), vect_slp_gather_vectorized_scalar_stmts(), vectorizable_operation(), vectorizable_simd_clone_call(), verify_gimple_in_cfg(), verify_histograms(), cgraph_node::verify_node(), walk_polymorphic_call_targets(), walk_polymorphic_call_targets(), walk_tree_1(), and write_symbol().

◆ begin()

◆ contains()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
bool hash_set< KeyId, Lazy, Traits >::contains ( const Key & k)
inline

References hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), hash_table< Descriptor, Lazy, Allocator >::find_with_hash(), hash_set< KeyId, Lazy, Traits >::m_table, and NULL.

Referenced by adjust_clone_incoming_counts(), analyze_clone_icoming_counts(), asan_emit_stack_protection(), branch_prob(), check_bool_pattern(), combine_predictions_for_bb(), compute_added_num_insns(), cond_store_replacement(), ana::trimmed_graph::contains_p(), ana::exploded_graph::detect_infinite_loops(), DFS::DFS_write_tree(), do_per_function_toporder(), duplicate_cgraph_node_to_order(), enqueue_node(), evaluate_bbs(), execute_early_expand_coro_ifns(), expand_stack_vars(), ipa_icf::sem_item_optimizer::filter_removed_items(), find_always_executed_bbs(), find_control_dep_blocks(), find_local_vars_to_propagate(), fold_marked_statements(), gen_simplified_condition(), gimplify_bind_expr(), gimplify_expr(), gimplify_omp_for(), go_output_typedef(), go_output_var(), group_case_labels_stmt(), has_undefined_value_p(), ipa_devirt(), ipa_inline(), is_group(), last_fma_candidate_feeds_initial_phi(), lower_eh_dispatch(), main(), sarif_builder::make_result_object(), ipa_param_body_adjustments::mark_dead_statements(), maybe_lower_iteration_bound(), maybe_make_indirect(), mfb_redirect_edges_in_set(), ipa_param_body_adjustments::modify_call_stmt(), neuter_worker_single(), noce_convert_multiple_sets_1(), not_removed_prediction_p(), oacc_resolve_clause_dependencies(), predict_loops(), ipa_param_body_adjustments::prepare_debug_expressions(), prepare_vec_mask(), print_node(), push_to_worklist(), record_target_from_binfo(), register_odr_type(), cgraph_node::remove(), symbol_table::remove_unreachable_nodes(), symbol_table::remove_unreferenced_decls(), sccopy_visit_op(), simplify_loop_version(), suggest_attribute(), type_internals_preclude_sra_p_1(), ana::uncertainty_t::unknown_sm_state_p(), back_jt_path_registry::update_cfg(), update_counts_for_self_gen_clones(), update_profile_after_ch(), value_available_p(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_slp_analyze_operations(), vectorizable_condition(), vectorizable_operation(), verify_location(), cgraph_node::verify_node(), worker_single_copy(), and worker_single_simple().

◆ create_ggc()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
static hash_set * hash_set< KeyId, Lazy, Traits >::create_ggc ( size_t n)
inlinestatic

◆ elements()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
size_t hash_set< KeyId, Lazy, Traits >::elements ( ) const
inline

◆ empty()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
void hash_set< KeyId, Lazy, Traits >::empty ( )
inline

◆ end()

◆ is_empty()

◆ remove()

◆ traverse()

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
template<typename Arg , bool(*)(const typename Traits::value_type &, Arg) f>
void hash_set< KeyId, Lazy, Traits >::traverse ( Arg a) const
inline

Friends And Related Symbol Documentation

◆ gt_ggc_mx

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
template<typename T , typename U >
void gt_ggc_mx ( hash_set< T, false, U > * )
friend

◆ gt_pch_nx [1/2]

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
template<typename T , typename U >
void gt_pch_nx ( hash_set< T, false, U > * )
friend

◆ gt_pch_nx [2/2]

template<typename KeyId , bool Lazy = false, typename Traits = default_hash_traits<KeyId>>
template<typename T , typename U >
void gt_pch_nx ( hash_set< T, false, U > * ,
gt_pointer_operator ,
void *  )
friend

Field Documentation

◆ m_table


The documentation for this class was generated from the following file: