GCC Middle and Back End API Reference
vec.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vec_prefix
 
struct  vl_embed
 
struct  vl_ptr
 
struct  va_heap
 
struct  va_gc
 
struct  va_gc_atomic
 
struct  vec< T, A, L >
 
struct  vnull
 
struct  vec< T, A, vl_embed >
 
struct  vec< T, va_heap, vl_ptr >
 
class  auto_vec< T, N >
 
class  auto_vec< T, 0 >
 
class  auto_string_vec
 
class  auto_delete_vec< T >
 
class  array_slice< T >
 

Macros

#define DEFINE_DEBUG_VEC(T)
 
#define VEC_ORDERED_REMOVE_IF_FROM_TO(vec, read_index, write_index, elem_ptr, start, end, cond)
 
#define VEC_ORDERED_REMOVE_IF(vec, read_index, write_index, elem_ptr, cond)
 
#define FOR_EACH_VEC_ELT(V, I, P)    for (I = 0; (V).iterate ((I), &(P)); ++(I))
 
#define FOR_EACH_VEC_SAFE_ELT(V, I, P)    for (I = 0; vec_safe_iterate ((V), (I), &(P)); ++(I))
 
#define FOR_EACH_VEC_ELT_FROM(V, I, P, FROM)    for (I = (FROM); (V).iterate ((I), &(P)); ++(I))
 
#define FOR_EACH_VEC_ELT_REVERSE(V, I, P)
 
#define FOR_EACH_VEC_SAFE_ELT_REVERSE(V, I, P)
 

Functions

void ggc_free (void *)
 
size_t ggc_round_alloc_size (size_t requested_size)
 
void * ggc_realloc (void *, size_t MEM_STAT_DECL)
 
void dump_vec_loc_statistics (void)
 
template<typename T >
void vec_destruct (T *dst, unsigned n)
 
template<typename T , typename A , typename L >
Tbegin (vec< T, A, L > *v)
 
template<typename T , typename A , typename L >
Tend (vec< T, A, L > *v)
 
template<typename T , typename A , typename L >
const Tbegin (const vec< T, A, L > *v)
 
template<typename T , typename A , typename L >
const Tend (const vec< T, A, L > *v)
 
template<typename T >
void debug_helper (vec< T > &ref)
 
template<typename T >
void debug_helper (vec< T, va_gc > &ref)
 
template<typename T >
void vec_default_construct (T *dst, unsigned n)
 
template<typename T >
void vec_copy_construct (T *dst, const T *src, unsigned n)
 
template<typename T , typename A >
bool vec_safe_space (const vec< T, A, vl_embed > *v, unsigned nelems)
 
template<typename T , typename A >
unsigned vec_safe_length (const vec< T, A, vl_embed > *v)
 
template<typename T , typename A >
Tvec_safe_address (vec< T, A, vl_embed > *v)
 
template<typename T , typename A >
bool vec_safe_is_empty (vec< T, A, vl_embed > *v)
 
template<typename T , typename A >
bool vec_safe_reserve (vec< T, A, vl_embed > *&v, unsigned nelems, bool exact=false CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
bool vec_safe_reserve_exact (vec< T, A, vl_embed > *&v, unsigned nelems CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_alloc (vec< T, A, vl_embed > *&v, unsigned nelems CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_free (vec< T, A, vl_embed > *&v)
 
template<typename T , typename A >
void vec_safe_grow (vec< T, A, vl_embed > *&v, unsigned len, bool exact=false CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_safe_grow_cleared (vec< T, A, vl_embed > *&v, unsigned len, bool exact=false CXX_MEM_STAT_INFO)
 
template<typename T >
void vec_safe_grow_cleared (vec< T, va_heap, vl_ptr > *&v, unsigned len, bool exact=false CXX_MEM_STAT_INFO)
 
template<typename T >
bool vec_safe_reserve (vec< T, va_heap, vl_ptr > *&v, unsigned nelems, bool exact=false CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
bool vec_safe_iterate (const vec< T, A, vl_embed > *v, unsigned ix, T **ptr)
 
template<typename T , typename A >
bool vec_safe_iterate (const vec< T, A, vl_embed > *v, unsigned ix, T *ptr)
 
template<typename T , typename A >
Tvec_safe_push (vec< T, A, vl_embed > *&v, const T &obj CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_safe_insert (vec< T, A, vl_embed > *&v, unsigned ix, const T &obj CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_safe_truncate (vec< T, A, vl_embed > *v, unsigned size)
 
template<typename T , typename A >
vec< T, A, vl_embed > * vec_safe_copy (vec< T, A, vl_embed > *src CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
void vec_safe_splice (vec< T, A, vl_embed > *&dst, const vec< T, A, vl_embed > *src CXX_MEM_STAT_INFO)
 
template<typename T , typename A >
bool vec_safe_contains (vec< T, A, vl_embed > *v, const T &search)
 
template<typename T >
void gt_ggc_mx (vec< T, va_gc > *v)
 
template<typename T >
void gt_ggc_mx (vec< T, va_gc_atomic, vl_embed > *v)
 
template<typename T , typename A >
void gt_pch_nx (vec< T, A, vl_embed > *v)
 
template<typename T >
void gt_pch_nx (vec< T, va_gc_atomic, vl_embed > *)
 
template<typename T , typename A >
void gt_pch_nx (vec< T *, A, vl_embed > *v, gt_pointer_operator op, void *cookie)
 
template<typename T , typename A >
void gt_pch_nx (vec< T, A, vl_embed > *v, gt_pointer_operator op, void *cookie)
 
template<typename T >
void gt_pch_nx (vec< T, va_gc_atomic, vl_embed > *, gt_pointer_operator, void *)
 
template<typename T >
void vec_alloc (vec< T > *&v, unsigned nelems CXX_MEM_STAT_INFO)
 
template<typename T >
void vec_check_alloc (vec< T, va_heap > *&vec, unsigned nelems CXX_MEM_STAT_INFO)
 
template<typename T >
void vec_free (vec< T > *&v)
 
template<typename T >
void release_vec_vec (vec< vec< T > > &vec)
 
template<typename T >
array_slice< Tmake_array_slice (T *base, unsigned int size)
 

Variables

htab_t vec_mem_usage_hash
 
constexpr vnull vNULL { }
 

Macro Definition Documentation

◆ DEFINE_DEBUG_VEC

#define DEFINE_DEBUG_VEC ( T)
Value:
template void debug_helper (vec<T> &); \
template void debug_helper (vec<T, va_gc> &); \
/* Define the vec<T> debug functions. @endverbatim */ \
debug (vec<T> &ref) \
{ \
debug_helper <T> (ref); \
} \
debug (vec<T> *ptr) \
{ \
if (ptr) \
debug (*ptr); \
else \
fprintf (stderr, "<nil>\n"); \
} \
/* Define the vec<T, va_gc> debug functions. @endverbatim */ \
debug (vec<T, va_gc> &ref) \
{ \
debug_helper <T> (ref); \
} \
debug (vec<T, va_gc> *ptr) \
{ \
if (ptr) \
debug (*ptr); \
else \
fprintf (stderr, "<nil>\n"); \
}
Definition vec.h:450
#define DEBUG_FUNCTION
Definition system.h:1242
void debug_helper(vec< T > &ref)
Definition vec.h:476
Macro to define debug(vec<T>) and debug(vec<T, va_gc>) helper
functions for a type T.   

◆ FOR_EACH_VEC_ELT

#define FOR_EACH_VEC_ELT ( V,
I,
P )    for (I = 0; (V).iterate ((I), &(P)); ++(I))
Convenience macro for forward iteration.   

Referenced by add_labels_and_missing_jumps(), pcom_worker::add_looparound_copies(), add_other_self_distances(), add_stmt_costs(), adjust_unroll_factor(), analyze_function_body(), analyze_memory_references(), ao_ref_init_from_vn_reference(), function_reader::apply_fixups(), asan_poison_variables(), assign_parms(), attempt_builtin_copysign(), attempt_builtin_powi(), best_gain_for_invariant(), bitmap_tree_listify_from(), branch_fixup(), complex_fms_pattern::build(), complex_mul_pattern::build(), complex_pattern::build(), build_classic_dir_vector(), build_pred_graph(), loop_distribution::build_rdg_partition_for_vertex(), build_succ_graph(), vect_optimize_slp_pass::build_vertices(), vect_optimize_slp_pass::build_vertices(), calculate_dominance_info_for_region(), can_produce_all_loop_masks_p(), ana::program_state::can_purge_p(), can_vectorize_live_stmts(), candidates_list_and_hint(), case_label_p(), check_annul_list_true_false(), check_for_overlaps(), check_reduction_path(), chrec_apply_map(), loop_distribution::classify_builtin_ldst(), clean(), simplify_using_ranges::cleanup_edges_and_switches(), clobbers_queued_reg_save(), collect_bb2reg(), combine_reaching_defs(), combine_var_copies_in_loop_exit(), compute_all_dependences(), compute_antic_aux(), compute_bb_dataflow(), compute_partial_antic_aux(), cond_if_else_store_replacement(), connect_traces(), constraint_set_union(), contains_storage_order_barrier_p(), convert_cfa_to_fb_loc_list(), cgraph_node::create_clone(), create_dispatcher_calls(), function_reader::create_edges(), create_loop_tree_node_allocnos(), create_loop_tree_nodes(), create_phi_basis_1(), create_pseudo_cfg(), loop_distribution::create_rdg_vertices(), create_variable_info_for(), cgraph_node::create_version_clone(), debug_raw(), decode_options(), dependence_distance_ge_vf(), determine_dominators_for_sons(), determine_loop_nest_reuse(), pcom_worker::determine_roots_comp(), determine_unroll_factor(), df_free_collection_rec(), df_get_conditional_uses(), df_install_refs(), df_mws_verify(), df_notes_rescan(), df_refs_verify(), DFS::DFS_write_tree_body(), discover_loop(), loop_distribution::distribute_loop(), do_deref(), do_hoist_insertion(), do_pre_partial_partial_insertion(), do_pre_regular_insertion(), dse_step2(), dse_step2_init(), dse_step3(), dse_step3_exit_block_scan(), dump_block_node(), dump_cand_vec(), dump_chain(), dump_chains(), dump_component(), dump_data_dependence_relation(), digraph< GraphTraits >::dump_dot_to_pp(), dump_enumerated_decls(), dump_ops_vector(), dump_rdg_partitions(), dump_tm_clone_pairs(), ana::one_way_id_map< T >::dump_to_pp(), duplicate_loop_body_to_header_edge(), dwarf2out_flush_queued_reg_saves(), elim_graph_add_node(), eliminate_local_variables(), eliminate_phi(), optinfo::emit_for_opt_problem(), emit_mfence_after_loop(), emit_notes_in_bb(), estimate_numbers_of_iterations(), loop_distribution::execute(), execute_compare_elim_after_reload(), execute_dwarf2_frame(), execute_load_motion(), execute_lower_omp(), pcom_worker::execute_pred_commoning(), execute_tm_mark(), pcom_worker::filter_suitable_components(), find_and_remove_re(), find_closest_identifier(), find_closest_string(), find_func_aliases(), find_func_aliases_for_builtin_call(), find_func_aliases_for_call(), find_func_aliases_for_call_arg(), find_func_clobbers(), find_label_entry(), find_loop_niter(), find_loop_niter_by_eval(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), find_rarely_executed_basic_blocks_and_crossing_edges(), find_subloop_latch_edge_by_ivs(), find_subloop_latch_edge_by_profile(), find_tail_calls(), find_tune_attr(), finite_loop_p(), fix_loop_placement(), fix_loop_structure(), fixup_eh_region_pointers(), ipa_icf::sem_item_optimizer::fixup_points_to_sets(), ipa_icf::sem_item_optimizer::fixup_pt_set(), flag_instrument_functions_exclude_p(), flow_loop_dump(), free_dominance_info_for_region(), free_inv_motion_data(), free_loop_data(), gather_scalar_reductions(), gen_command_line_string(), gen_scheduled_generic_parms_dies(), get_constraint_for_1(), get_constraint_for_address_of(), edited_line::get_effective_column(), get_reassociation_width(), ggc_mark_roots(), gimple_find_values_to_profile(), gimple_lower_bitint(), gimplify_parameters(), handle_abnormal_edges(), handle_common_deferred_options(), handle_deferred_dump_options(), handle_rhs_call(), gen_reader::handle_unknown_directive(), hash_tree(), hoist_code(), hoist_memory_references(), init_alias_analysis(), init_reg_last(), initialize_root_vars(), initialize_root_vars_lm(), initialize_root_vars_store_elim_2(), input_cgraph_1(), modref_access_node::insert_kill(), insert_looparound_copy(), insert_phi_nodes(), insert_var_expansion_initialization(), instrument_memory_accesses(), ipa_merge_modref_summary_after_inlining(), ipa_odr_summary_write(), ipa_print_node_jump_functions_for_edge(), ipa_propagate_indirect_call_infos(), ipa_pta_execute(), ipa_release_body_info(), ipa_tm_scan_calls_transaction(), ipcp_transform_function(), ira_loop_edge_freq(), ira_loop_tree_body_rev_postorder(), ira_traverse_loop_tree(), is_linear_load_p(), iterate_fix_dominators(), known_contexts_useful_p(), known_dependences_p(), lambda_transform_legal_p(), last_always_executed_block(), lhd_simulate_enum_decl(), linear_loads_p(), loop_edge_to_cancel(), loop_suitable_for_sm(), lower_oacc_private_marker(), lto_output_node(), main(), make_constraints_to(), make_invariant_chain(), make_new_ssa_for_all_defs(), map_attr_string(), mask_exists(), match_pattern_2(), vect_optimize_slp_pass::materialize(), may_use_storent_in_loop_p(), maybe_optimize_guarding_check(), maybe_unwind_expanded_macro_loc(), ipa_icf::sem_item_optimizer::merge_classes(), merge_identical_invariants(), merge_latch_edges(), merge_node_constraints(), merge_patterns(), move_complex_constraints(), move_invariants(), move_sese_region_to_fn(), oacc_entry_exit_ok_1(), oacc_entry_exit_single_gang(), oacc_resolve_clause_dependencies(), omp_build_struct_sibling_lists(), omp_construct_simd_compare(), omp_index_mapping_groups_1(), omp_reorder_mapping_groups(), omp_resolve_clause_dependencies(), omp_resolve_declare_variant(), omp_tsort_mapping_groups(), optimize_abbrev_table(), optimize_constant_pool(), optimize_load_redistribution(), optimize_load_redistribution_1(), optimize_range_tests(), optimize_range_tests_cmp_bitwise(), optimize_recip_sqrt(), optimize_vec_cond_expr(), ordered_hash_map< KeyId, Value, Traits >::ordered_hash_map(), output_aranges(), output_btf_func_types(), output_call_frame_info(), output_in_order(), output_line_info(), output_object_block(), output_object_blocks(), output_one_function_exception_table(), output_pubnames(), parloops_is_simple_reduction(), function_reader::parse_mem_expr(), partition_contains_all_rw(), predict_loops(), ana::checker_path::prepare_for_emission(), pcom_worker::prepare_initializers_chain(), json::array::print(), json::object::print(), edited_line::print_content(), edited_line::print_diff_lines(), print_subroutine_group(), process_all_all_constraints(), thunk_info::process_early_thunks(), process_ipa_clobber(), propagate(), propagate_aggs_across_jump_function(), propagate_constants_topo(), propagate_vals_across_arith_jfunc(), prune_offload_funcs(), prune_runtime_alias_test_list(), push_without_duplicates(), putenv_COLLECT_AS_OPTIONS(), queue_reg_save(), rank_ops_for_fma(), loop_distribution::rdg_build_partitions(), ana::reachability< GraphTraits >::reachability(), record_reg_saved_in_reg(), redundant_insn(), reg_saved_in(), pcom_worker::release_chain(), pcom_worker::release_chains(), release_vec_loop_controls(), ipa_edge_args_sum_t::remove(), remove_bb(), remove_edge_and_dominated_blocks(), vect_optimize_slp_pass::remove_redundant_permutations(), rename_chains(), replace_names_by_phis(), replace_phis_by_defined_names(), repropagate_negates(), rewrite_constraints(), rewrite_expr_tree_parallel(), scan_reads(), section_sanitized_p(), self_referential_size(), self_reuse_distance(), separate_decls_in_region(), set_level(), set_sanitized_sections(), set_type_canonical_for_odr_type(), shortest_paths< GraphTraits, Path_t >::shortest_paths(), simd_clone_vector_of_formal_parm_types(), single_likely_exit(), size_of_aranges(), size_of_pubnames(), solve_graph(), split_complex_args(), pcom_worker::split_data_refs_to_components(), split_function(), ssa_conflicts_dump(), steal_delay_list_from_target(), pcom_worker::suitable_component_p(), transform_add_to_multiply(), traverse_btf_func_types(), tree_if_conversion(), tree_loop_unroll_and_jam(), tree_ssa_lim_finalize(), pcom_worker::try_combine_chains(), undistribute_bitref_for_vector(), undistribute_ops_list(), unloop_loops(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), update_alignments(), update_epilogue_loop_vinfo(), update_jump_functions_after_inlining(), update_ssa(), valid_in_sets(), vec_find(), vect_analyze_data_ref_accesses(), vect_analyze_data_ref_dependence(), vect_analyze_data_ref_dependences(), vect_analyze_data_refs(), vect_analyze_data_refs_alignment(), vect_analyze_loop_2(), vect_analyze_slp(), vect_bb_partition_graph_r(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_bb_vectorization_profitable_p(), vect_build_slp_tree_1(), vect_build_slp_tree_2(), vect_contains_pattern_stmt_p(), vect_create_cond_for_align_checks(), vect_create_cond_for_unequal_addrs(), vect_create_epilog_for_reduction(), vect_create_half_widening_stmts(), vect_create_vectorized_promotion_stmts(), vect_dissolve_slp_only_groups(), vect_enhance_data_refs_alignment(), vect_estimate_min_profitable_iters(), vect_fixup_scalar_cycles_with_patterns(), vect_fixup_store_groups_with_patterns(), vect_free_oprnd_info(), vect_free_slp_tree(), vect_gather_slp_loads(), vect_gather_slp_loads(), vect_get_known_peeling_cost(), vect_get_loop_niters(), vect_get_max_nscalars_per_iter(), vect_make_slp_decision(), vect_mark_slp_stmts(), vect_mark_slp_stmts_relevant(), vect_match_slp_patterns_2(), vect_print_slp_graph(), vect_print_slp_tree(), vect_prune_runtime_alias_test_list(), vect_record_grouped_load_vectors(), vect_remove_slp_scalar_calls(), vect_schedule_scc(), vect_schedule_slp(), vect_schedule_slp_node(), vect_set_loop_condition_partial_vectors(), vect_slp_analyze_bb_1(), vect_slp_analyze_instance_alignment(), vect_slp_analyze_node_operations(), vect_slp_analyze_node_operations_1(), vect_slp_convert_to_external(), vect_slp_gather_vectorized_scalar_stmts(), vect_slp_prune_covered_roots(), vect_slp_tree_uniform_p(), vect_transform_loop(), vect_update_inits_of_drs(), vect_verify_loop_lens(), vectorizable_assignment(), vectorizable_bswap(), vectorizable_call(), vectorizable_comparison_1(), vectorizable_condition(), vectorizable_conversion(), vectorizable_induction(), vectorizable_load(), vectorizable_operation(), vectorizable_phi(), vectorizable_recurr(), vectorizable_reduction(), vectorizable_shift(), vectorizable_slp_permutation_1(), vectorize_fold_left_reduction(), vectorize_slp_instance_root_stmt(), verify_sese(), operands_scanner::verify_ssa_operands(), vn_reference_compute_hash(), vn_reference_lookup_3(), vn_reference_may_trap(), vuse_semi_invariant_p(), write_ts_binfo_tree_pointers(), json::array::~array(), auto_cpp_string_vec::~auto_cpp_string_vec(), auto_delete_vec< T >::~auto_delete_vec(), auto_string_vec::~auto_string_vec(), edited_line::~edited_line(), function_reader::~function_reader(), and optinfo::~optinfo().

◆ FOR_EACH_VEC_ELT_FROM

#define FOR_EACH_VEC_ELT_FROM ( V,
I,
P,
FROM )    for (I = (FROM); (V).iterate ((I), &(P)); ++(I))
Likewise, but start from FROM rather than 0.   

Referenced by analyze_candidates_and_replace(), dump_def_use_chain(), and omp_resolve_declare_variant().

◆ FOR_EACH_VEC_ELT_REVERSE

◆ FOR_EACH_VEC_SAFE_ELT

#define FOR_EACH_VEC_SAFE_ELT ( V,
I,
P )    for (I = 0; vec_safe_iterate ((V), (I), &(P)); ++(I))

Referenced by add_bb_to_loop(), add_clobbers_to_eh_landing_pad(), add_dwarf_attr(), adjust_insn(), tree_switch_conversion::switch_conversion::array_value_type(), assign_location_list_indexes(), build_abbrev_table(), build_call_vec(), build_nt_call_vec(), tree_switch_conversion::switch_conversion::build_one_array(), build_tree_list_vec(), check_die(), clone_as_declaration(), clone_die(), modref_base_node< T >::collapse(), modref_tree< T >::collapse(), collect_checksum_attributes(), tree_switch_conversion::switch_conversion::contains_linear_function_p(), convert_cfa_to_fb_loc_list(), copy_declaration_context(), copy_decls_walk(), copy_dwarf_procs_ref_in_attrs(), create_loop_tree_nodes(), create_trace_edges(), cgraph_node::create_virtual_clone(), die_checksum(), dump_cfi_row(), dump_final_node_vcg(), dump_lto_records(), dump_records(), omp_declare_variant_hasher::equal(), establish_preds(), execute_update_addresses_taken(), modref_summary::finalize(), fini_ssanames(), flow_loops_free(), get_AT(), gimplify_init_constructor(), gimplify_init_ctor_preeval(), modref_tree< T >::global_access_p(), go_finish(), omp_declare_variant_hasher::hash(), index_rnglists(), modref_access_node::insert(), ipa_lower_emutls(), ipa_write_jump_function(), is_declaration_die(), loc_list_from_tree_1(), make_edges(), mark_all_loops_for_removal(), maybe_remove_unreachable_handlers(), modref_tree< T >::merge(), more_one_region_p(), omp_lto_output_declare_variant_alt(), omp_resolve_declare_variant(), omp_resolve_late_declare_variant(), optimize_abbrev_table(), optimize_external_refs_1(), optimize_implicit_const(), optimize_location_lists(), optimize_vector_constructor(), output_abbrev_section(), output_die(), output_eh_regions(), output_location_lists(), output_loclists_offsets(), output_node_opt_summary(), output_object_block(), output_one_line_info_table(), output_ranges(), output_rnglists(), output_struct_function_base(), print_die(), prune_unused_types_prune(), rebuild_jump_labels_1(), rebuild_regno_allocno_maps(), modref_tree< T >::remap_params(), remove_AT(), remove_bb_from_loops(), remove_unreachable_handlers(), remove_unreachable_handlers_no_lp(), safe_from_p(), same_die_p(), modref_base_node< T >::search(), modref_tree< T >::search(), set_initial_label_offsets(), setup_entered_from_non_parent_p(), simplify_vector_constructor(), size_of_die(), unmark_all_dies(), unshare_all_rtl_1(), unshare_all_rtl_again(), update_jump_functions_after_inlining(), vec_cst_ctor_to_array(), vec_member(), and ipa_edge_args::~ipa_edge_args().

◆ FOR_EACH_VEC_SAFE_ELT_REVERSE

#define FOR_EACH_VEC_SAFE_ELT_REVERSE ( V,
I,
P )
Value:
for (I = vec_safe_length (V) - 1; \
vec_safe_iterate ((V), (I), &(P)); \
(I)--)
unsigned vec_safe_length(const vec< T, A, vl_embed > *v)
Definition vec.h:685

Referenced by vec2chain().

◆ VEC_ORDERED_REMOVE_IF

#define VEC_ORDERED_REMOVE_IF ( vec,
read_index,
write_index,
elem_ptr,
cond )
Value:
VEC_ORDERED_REMOVE_IF_FROM_TO ((vec), read_index, write_index, \
elem_ptr, 0, (vec).length (), (cond))
#define VEC_ORDERED_REMOVE_IF_FROM_TO(vec, read_index, write_index, elem_ptr, start, end, cond)
Definition vec.h:1121
Remove elements from VEC for which COND holds.  Ordering of remaining
elements is preserved.  This is an O(N) operation.   

Referenced by prune_offload_funcs().

◆ VEC_ORDERED_REMOVE_IF_FROM_TO

#define VEC_ORDERED_REMOVE_IF_FROM_TO ( vec,
read_index,
write_index,
elem_ptr,
start,
end,
cond )
Value:
{ \
gcc_assert ((end) <= (vec).length ()); \
for (read_index = write_index = (start); read_index < (end); \
++read_index) \
{ \
elem_ptr = &(vec)[read_index]; \
bool remove_p = (cond); \
if (remove_p) \
continue; \
\
if (read_index != write_index) \
(vec)[write_index] = (vec)[read_index]; \
\
write_index++; \
} \
\
if (read_index - write_index > 0) \
(vec).block_remove (write_index, read_index - write_index); \
}
T * end(vec< T, A, L > *v)
Definition vec.h:457
Remove elements in [START, END) from VEC for which COND holds.  Ordering of
remaining elements is preserved.  This is an O(N) operation.   

Referenced by connect_traces().

Function Documentation

◆ begin() [1/2]

template<typename T , typename A , typename L >
const T * begin ( const vec< T, A, L > * v)

◆ begin() [2/2]

◆ debug_helper() [1/2]

template<typename T >
void debug_helper ( vec< T > & ref)
Generic vec<> debug helpers.

These need to be instantiated for each vec<TYPE> used throughout
the compiler like this:

 DEFINE_DEBUG_VEC (TYPE)

The reason we have a debug_helper() is because GDB can't
disambiguate a plain call to debug(some_vec), and it must be called
like debug<TYPE>(some_vec).   

References debug_slim(), fputc(), and i.

◆ debug_helper() [2/2]

template<typename T >
void debug_helper ( vec< T, va_gc > & ref)
We need a separate va_gc variant here because default template
argument for functions cannot be used in c++-98.  Once this
restriction is removed, those variant should be folded with the
above debug_helper.   

References debug_slim(), fputc(), and i.

◆ dump_vec_loc_statistics()

void dump_vec_loc_statistics ( void )
extern
Templated vector type and associated interfaces.

  The interface functions are typesafe and use inline functions,
  sometimes backed by out-of-line generic functions.  The vectors are
  designed to interoperate with the GTY machinery.

  There are both 'index' and 'iterate' accessors.  The index accessor
  is implemented by operator[].  The iterator returns a boolean
  iteration condition and updates the iteration variable passed by
  reference.  Because the iterator will be inlined, the address-of
  can be optimized away.

  Each operation that increases the number of active elements is
  available in 'quick' and 'safe' variants.  The former presumes that
  there is sufficient allocated space for the operation to succeed
  (it dies if there is not).  The latter will reallocate the
  vector, if needed.  Reallocation causes an exponential increase in
  vector size.  If you know you will be adding N elements, it would
  be more efficient to use the reserve operation before adding the
  elements with the 'quick' operation.  This will ensure there are at
  least as many elements as you ask for, it will exponentially
  increase if there are too few spare slots.  If you want reserve a
  specific number of slots, but do not want the exponential increase
  (for instance, you know this is the last allocation), use the
  reserve_exact operation.  You can also create a vector of a
  specific size from the get go.

  You should prefer the push and pop operations, as they append and
  remove from the end of the vector. If you need to remove several
  items in one go, use the truncate operation.  The insert and remove
  operations allow you to change elements in the middle of the
  vector.  There are two remove operations, one which preserves the
  element ordering 'ordered_remove', and one which does not
  'unordered_remove'.  The latter function copies the end element
  into the removed slot, rather than invoke a memmove operation.  The
  'lower_bound' function will determine where to place an item in the
  array using insert that will maintain sorted order.

  Vectors are template types with three arguments: the type of the
  elements in the vector, the allocation strategy, and the physical
  layout to use

  Four allocation strategies are supported:

       - Heap: allocation is done using malloc/free.  This is the
         default allocation strategy.

        - GC: allocation is done using ggc_alloc/ggc_free.

        - GC atomic: same as GC with the exception that the elements
         themselves are assumed to be of an atomic type that does
         not need to be garbage collected.  This means that marking
         routines do not need to traverse the array marking the
         individual elements.  This increases the performance of
         GC activities.

  Two physical layouts are supported:

       - Embedded: The vector is structured using the trailing array
         idiom.  The last member of the structure is an array of size
         1.  When the vector is initially allocated, a single memory
         block is created to hold the vector's control data and the
         array of elements.  These vectors cannot grow without
         reallocation (see discussion on embeddable vectors below).

       - Space efficient: The vector is structured as a pointer to an
         embedded vector.  This is the default layout.  It means that
         vectors occupy a single word of storage before initial
         allocation.  Vectors are allowed to grow (the internal
         pointer is reallocated but the main vector instance does not
         need to relocate).

  The type, allocation and layout are specified when the vector is
  declared.

  If you need to directly manipulate a vector, then the 'address'
  accessor will return the address of the start of the vector.  Also
  the 'space' predicate will tell you whether there is spare capacity
  in the vector.  You will not normally need to use these two functions.

  Not all vector operations support non-POD types and such restrictions
  are enforced through static assertions.  Some operations which often use
  memmove to move elements around like quick_insert, safe_insert,
  ordered_remove, unordered_remove, block_remove etc. require trivially
  copyable types.  Sorting operations, qsort, sort and stablesort, require
  those too but as an extension allow also std::pair of 2 trivially copyable
  types which happens to work even when std::pair itself isn't trivially
  copyable.  The quick_grow and safe_grow operations require trivially
  default constructible types.  One can use quick_grow_cleared or
  safe_grow_cleared for non-trivially default constructible types if needed
  (but of course such operation is more expensive then).  The pop operation
  returns reference to the last element only for trivially destructible
  types, for non-trivially destructible types one should use last operation
  followed by pop which in that case returns void.
  And finally, the GC and GC atomic vectors should always be used with
  trivially destructible types, as nothing will invoke destructors when they
  are freed during GC.

  Notes on the different layout strategies

  * Embeddable vectors (vec<T, A, vl_embed>)
  
    These vectors are suitable to be embedded in other data
    structures so that they can be pre-allocated in a contiguous
    memory block.

    Embeddable vectors are implemented using the trailing array
    idiom, thus they are not resizeable without changing the address
    of the vector object itself.  This means you cannot have
    variables or fields of embeddable vector type -- always use a
    pointer to a vector.  The one exception is the final field of a
    structure, which could be a vector type.

    You will have to use the embedded_size & embedded_init calls to
    create such objects, and they will not be resizeable (so the
    'safe' allocation variants are not available).

    Properties of embeddable vectors:

         - The whole vector and control data are allocated in a single
           contiguous block.  It uses the trailing-vector idiom, so
           allocation must reserve enough space for all the elements
           in the vector plus its control data.
         - The vector cannot be re-allocated.
         - The vector cannot grow nor shrink.
         - No indirections needed for access/manipulation.
         - It requires 2 words of storage (prior to vector allocation).


  * Space efficient vector (vec<T, A, vl_ptr>)

    These vectors can grow dynamically and are allocated together
    with their control data.  They are suited to be included in data
    structures.  Prior to initial allocation, they only take a single
    word of storage.

    These vectors are implemented as a pointer to embeddable vectors.
    The semantics allow for this pointer to be NULL to represent
    empty vectors.  This way, empty vectors occupy minimal space in
    the structure containing them.

    Properties:

       - The whole vector and control data are allocated in a single
         contiguous block.
        - The whole vector may be re-allocated.
        - Vector data may grow and shrink.
        - Access and manipulation requires a pointer test and
         indirection.
        - It requires 1 word of storage (prior to vector allocation).

  An example of their use would be,

  struct my_struct {
    // A space-efficient vector of tree pointers in GC memory.
    vec<tree, va_gc, vl_ptr> v;
  };

  struct my_struct *s;

  if (s->v.length ()) { we have some contents }
  s->v.safe_push (decl); // append some decl onto the end
  for (ix = 0; s->v.iterate (ix, &elt); ix++)
    { do something with elt }
Support function for statistics.   
Dump per-site memory statistics.   

References vec_mem_desc, and VEC_ORIGIN.

Referenced by dump_memory_report().

◆ end() [1/2]

template<typename T , typename A , typename L >
const T * end ( const vec< T, A, L > * v)

◆ end() [2/2]

template<typename T , typename A , typename L >
T * end ( vec< T, A, L > * v)

Referenced by add_frame_space(), add_path(), add_ranges_by_labels(), generic_subrtx_iterator< T >::add_subrtxes_to_queue(), align_fuzz(), analyze_function(), md_reader::apply_iterator_to_string(), asan_clear_shadow(), asm_operand_ok(), bit_field_mode_iterator::bit_field_mode_iterator(), bitmap_bit_in_range_p(), block_jumps_and_fallthru(), bound_difference(), bound_index(), tree_switch_conversion::bit_test_cluster::can_be_handled(), tree_switch_conversion::jump_table_cluster::can_be_handled(), can_copy_bbs_p(), cfg_layout_create_basic_block(), check_foffload_target_names(), cleanup_barriers(), clear_padding_emit_loop(), clear_padding_flush(), clear_padding_type(), compute_bb_for_insn(), compute_new_first_bound(), cond_exec_process_if_block(), cond_exec_process_insns(), constrain_operands(), construct_exit_block(), vector_builder< T, Shape, Derived >::count_dups(), cov_blocks(), cov_maps(), cov_masks(), create_basic_block(), create_basic_block_1(), create_basic_block_structure(), create_coalesce_list_for_region(), create_parallel_loop(), cse_cc_succs(), cse_change_cc_mode_insns(), dead_or_predicable(), debug_rtx_range(), decompose_multiword_subregs(), def_target_insn(), default_emit_call_builtin___clear_cache(), dse_step5(), dump_insn_list(), dump_labelled_location_range(), dump_location_range(), equivalent_reg_at_start(), expand_builtin___clear_cache(), expand_builtin_strub_leave(), extract_cond_operands(), extract_plus_operands(), find_bb_boundaries(), tree_switch_conversion::bit_test_cluster::find_bit_tests(), find_end_of_line(), tree_switch_conversion::jump_table_cluster::find_jump_tables(), find_loop_guard(), find_reloads(), fixup_reorder_chain(), pretty_printer::format(), generate_strlen_builtin_using_rawmemchr(), get_byte_aligned_range_contained_in_ref(), get_byte_aligned_range_containing_ref(), get_last_bb_insn(), get_section_anchor(), get_source_text_between(), gimple_fold_builtin_clear_padding(), gimplify_asm_expr(), gimplify_omp_affinity(), gimplify_omp_depend(), tree_switch_conversion::group_cluster::group_cluster(), handle_foffload_option(), handle_simple_exit(), init_attr_rdwr_indices(), integral_argument(), ira(), ira_get_dup_out_num(), ira_setup_alts(), tree_switch_conversion::bit_test_cluster::is_beneficial(), tree_switch_conversion::jump_table_cluster::is_beneficial(), iv_analyze_biv(), loop_has_blocks_with_irreducible_flag(), loop_has_phi_with_address_arg(), loop_has_vector_phi_nodes(), loop_parallel_p(), lower_omp_ordered(), lower_omp_task_reductions(), lower_rec_input_clauses(), lower_reduction_clauses(), main(), main(), maybe_emit_call_builtin___clear_cache(), maybe_run_lto_and_relink(), mem_might_overlap_already_clobbered_arg_p(), memref_used_between_p(), merge_if_block(), merge_into_decision(), mergesort(), modified_between_p(), new_loc_list(), bit_field_mode_iterator::next_mode(), no_labels_between_p(), omp_apply_tile(), omp_requires_to_name(), optimize_implicit_const(), optimize_range_tests_to_bit_test(), opts_concat(), output_constructor_bitfield(), output_fde(), output_ranges(), parse_and_check_align_values(), parser::parse_c_expr(), parse_input_constraint(), pp_append_text(), pp_maybe_wrap_text(), pp_wrap_text(), prepend_loc_descr_to_each(), preprocess_constraints(), print_hard_reg_set(), print_hard_reg_set(), print_rtl_with_bb(), print_type_tree(), process_address_1(), process_alt_operands(), propagate_for_debug(), range_from_loop_direction(), rtx_reader::read_rtx_operand(), record_effective_endpoints(), record_insns(), refine_bounds_using_guard(), refine_value_range_using_guard(), remove_attributes_matching(), reorder_basic_blocks_simple(), vector_builder< T, Shape, Derived >::repeating_sequence_p(), rtl_create_basic_block(), rtl_delete_block(), rtl_verify_bb_insn_chain(), scan_prog_file(), scan_reads(), scan_stores(), set_multilib_dir(), list_head< T >::range::set_parent(), set_sanitized_sections(), wi::shifted_mask(), simplify_bitfield_ref(), single_reg_class(), vector_builder< T, Shape, Derived >::stepped_sequence_p(), supports_vec_convert_optab_p(), switch_text_sections_between_p(), transform_add_to_multiply(), unique_locus_on_edge_between_p(), update_bb_for_insn_chain(), validate_arglist(), validate_gimple_arglist(), vect_build_slp_instance(), vect_set_loop_controls_directly(), and write_range_function().

◆ ggc_free()

void ggc_free ( void * p)
extern
Vector API for GNU compiler.
   Copyright (C) 2004-2024 Free Software Foundation, Inc.
   Contributed by Nathan Sidwell <nathan@codesourcery.com>
   Re-implemented in C++ by Diego Novillo <dnovillo@google.com>

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/>.   
Some gen* file have no ggc support as the header file gtype-desc.h is
missing.  Provide these definitions in case ggc.h has not been included.
This is not a problem because any code that runs before gengtype is built
will never need to use GC vectors. 
Free a block.  To be used when known for certain it's not reachable.   
Release the memory for object P.   

References ggc_globals::allocated, ggc_globals::debug_file, fmt_size_t, free(), G, GGC_DEBUG_LEVEL, ggc_free_overhead(), HOST_BITS_PER_LONG, HOST_SIZE_T_PRINT_UNSIGNED, in_gc, page_entry::in_use_p, lookup_page_table_entry(), page_entry::next, page_entry::next_bit_hint, NULL, page_entry::num_free_objects, OBJECT_SIZE, OFFSET_TO_BIT, page_entry::order, page_entry::page, ggc_globals::page_tails, ggc_globals::pages, page_entry::prev, and VALGRIND_DISCARD.

Referenced by add_var_loc_to_decl(), adjust_agg_replacement_values(), modref_base_node< T >::collapse(), modref_tree< T >::collapse(), ctfc_delete_container(), ctfc_delete_strtab(), hash_table< Descriptor, Lazy, Allocator >::empty_slow(), hash_table< Descriptor, Lazy, Allocator >::expand(), fini_ssa_operands(), flow_loop_free(), vrange_ggc_alloc::free(), free_block(), free_cfg(), free_edge(), symbol_table::free_edge(), free_loc_descr(), free_node(), free_numbers_of_iterations_estimates(), free_param_decl_accesses(), free_simple_loop_desc(), general_init(), ggc_realloc(), gimple_seq_discard(), gimplify_assign(), gimplify_decl_expr(), gimplify_init_ctor_eval(), gimplify_target_expr(), init_expmed(), init_tree_optimization_optabs(), internal_get_tmp_var(), ipcp_free_transformation_sum(), loc_list_from_tree_1(), loop_optimizer_finalize(), lto_delete_in_decl_state(), lto_free_function_in_decl_state(), cgraph_edge::make_direct(), move_sese_region_to_fn(), native_encode_initializer(), phi_dynamic_object_size(), range_info_free(), va_gc::release(), release_function_body(), release_phi_node(), release_section_hash_entry(), symbol_table::release_symbol(), loop_exit_hasher::remove(), odr_name_hasher::remove(), varpool_node::remove(), ipcp_transformation::remove_argaggs_if(), va_gc::reserve(), ipa_vr::set_unknown(), jump_threader::simplify_control_stmt_condition(), ipa_vr::streamer_read(), tree_add_const_value_attribute(), type_hash_canon(), wide_int_to_tree_1(), hash_table< Descriptor, Lazy, Allocator >::~hash_table(), and jump_threader::~jump_threader().

◆ ggc_realloc()

void * ggc_realloc ( void * ,
size_t MEM_STAT_DECL )
extern

Referenced by va_gc::reserve().

◆ ggc_round_alloc_size()

size_t ggc_round_alloc_size ( size_t requested_size)
extern
Null garbage collection for the GNU compiler.
Copyright (C) 1998-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/>.   
This version is used by the gen* programs and certain language-specific
targets (such as java), where we don't really need GC at all.
This prevents problems with pulling in all the tree stuff.   
For a given size of memory requested for allocation, return the
actual size that is going to be allocated.   
For a given size of memory requested for allocation, return the
actual size that is going to be allocated.   

References ggc_round_alloc_size_1(), and NULL.

Referenced by general_init(), and va_gc::reserve().

◆ gt_ggc_mx() [1/2]

template<typename T >
void gt_ggc_mx ( vec< T, va_gc > * v)
Garbage collection support for vec<T, A, vl_embed>.   

References gt_ggc_mx(), and i.

Referenced by gt_ggc_mx().

◆ gt_ggc_mx() [2/2]

template<typename T >
void gt_ggc_mx ( vec< T, va_gc_atomic, vl_embed > * v)

◆ gt_pch_nx() [1/5]

template<typename T , typename A >
void gt_pch_nx ( vec< T *, A, vl_embed > * v,
gt_pointer_operator op,
void * cookie )

References i, and NULL.

◆ gt_pch_nx() [2/5]

template<typename T , typename A >
void gt_pch_nx ( vec< T, A, vl_embed > * v)
PCH support for vec<T, A, vl_embed>.   

References gt_pch_nx(), and i.

Referenced by gt_pch_nx(), and gt_pch_nx().

◆ gt_pch_nx() [3/5]

template<typename T , typename A >
void gt_pch_nx ( vec< T, A, vl_embed > * v,
gt_pointer_operator op,
void * cookie )

References gt_pch_nx(), and i.

◆ gt_pch_nx() [4/5]

template<typename T >
void gt_pch_nx ( vec< T, va_gc_atomic, vl_embed > * )

◆ gt_pch_nx() [5/5]

template<typename T >
void gt_pch_nx ( vec< T, va_gc_atomic, vl_embed > * ,
gt_pointer_operator ,
void *  )

◆ make_array_slice()

template<typename T >
array_slice< T > make_array_slice ( T * base,
unsigned int size )

◆ release_vec_vec()

template<typename T >
void release_vec_vec ( vec< vec< T > > & vec)
inline
Release VEC and call release of all element vectors.   

References i.

◆ vec_alloc() [1/2]

template<typename T >
void vec_alloc ( vec< T > *& v,
unsigned nelems CXX_MEM_STAT_INFO )
inline
Allocate heap memory for pointer V and create the internal vector
with space for NELEMS elements.  If NELEMS is 0, the internal
vector is initialized to empty.   

References PASS_MEM_STAT.

◆ vec_alloc() [2/2]

template<typename T , typename A >
void vec_alloc ( vec< T, A, vl_embed > *& v,
unsigned nelems CXX_MEM_STAT_INFO )
inline

◆ vec_check_alloc()

template<typename T >
void vec_check_alloc ( vec< T, va_heap > *& vec,
unsigned nelems CXX_MEM_STAT_INFO )
inline
Conditionally allocate heap memory for VEC and its internal vector.   

References PASS_MEM_STAT, and vec_alloc().

Referenced by add_comma_separated_to_vector().

◆ vec_copy_construct()

template<typename T >
void vec_copy_construct ( T * dst,
const T * src,
unsigned n )
inline
Copy-construct N elements in DST from *SRC.   

References T.

Referenced by vec< T, A, vl_embed >::copy(), and vec< T, va_heap, vl_ptr >::reserve().

◆ vec_default_construct()

template<typename T >
void vec_default_construct ( T * dst,
unsigned n )
inline
Default-construct N elements in DST.   

References T.

Referenced by vec< T, A, vl_embed >::quick_grow_cleared().

◆ vec_destruct()

template<typename T >
void vec_destruct ( T * dst,
unsigned n )
inline
Destruct N elements in DST.   

Referenced by va_heap::release(), and vec< T, A, vl_embed >::truncate().

◆ vec_free() [1/2]

template<typename T >
void vec_free ( vec< T > *& v)
inline
Free the heap memory allocated by vector V and set it to NULL.   

References NULL.

◆ vec_free() [2/2]

template<typename T , typename A >
void vec_free ( vec< T, A, vl_embed > *& v)
inline
Free the GC memory allocated by vector V and set it to NULL.   

Referenced by strlen_pass::after_dom_children(), allocate_phi_node(), analyze_function_body(), modref_tree< T >::cleanup(), cleanup_control_flow_pre(), modref_base_node< T >::collapse(), modref_ref_node< T >::collapse(), modref_tree< T >::collapse(), decompose_param_expr(), delete_tree_cfg_annotations(), do_reload(), dump_final_node_vcg(), end_alias_analysis(), expand_call_inline(), finalize_size_functions(), fini_ssanames(), finish_record_layout(), flow_loop_free(), flow_loops_free(), generic_subrtx_iterator< T >::free_array(), free_block(), free_cfg(), free_node(), free_param_decl_accesses(), free_reg_equiv(), go_finish(), handle_alias_pairs(), instantiate_decls(), ipa_compute_jump_functions_for_edge(), ipa_odr_summary_write(), ipa_reference_write_optimization_summary(), ipcp_transform_function(), lto_delete_in_decl_state(), lto_free_function_in_decl_state(), omp_resolve_declare_variant(), output_offload_tables(), thunk_info::process_early_thunks(), propagate(), release_free_names_and_compact_live_names(), set_cond_stmt_execution_predicate(), set_switch_stmt_execution_predicate(), vt_finalize(), isra_func_summary::zap(), fast_call_summary< T *, V >::~fast_call_summary(), fast_function_summary< T *, V >::~fast_function_summary(), ipa_edge_args::~ipa_edge_args(), ipa_fn_summary::~ipa_fn_summary(), ipa_node_params::~ipa_node_params(), ipcp_transformation::~ipcp_transformation(), and isra_func_summary::~isra_func_summary().

◆ vec_safe_address()

template<typename T , typename A >
T * vec_safe_address ( vec< T, A, vl_embed > * v)
inline
If V is NULL, return NULL.  Otherwise, return V->address().   

References NULL.

Referenced by build_call_expr_loc_vec().

◆ vec_safe_contains()

template<typename T , typename A >
bool vec_safe_contains ( vec< T, A, vl_embed > * v,
const T & search )
inline
Return true if SEARCH is an element of V.  Note that this is O(N) in the
size of the vector and so should be used with care.   

Referenced by can_delete_label_p().

◆ vec_safe_copy()

◆ vec_safe_grow()

template<typename T , typename A >
void vec_safe_grow ( vec< T, A, vl_embed > *& v,
unsigned len,
bool exact = false CXX_MEM_STAT_INFO )
inline

◆ vec_safe_grow_cleared() [1/2]

◆ vec_safe_grow_cleared() [2/2]

template<typename T >
void vec_safe_grow_cleared ( vec< T, va_heap, vl_ptr > *& v,
unsigned len,
bool exact = false CXX_MEM_STAT_INFO )
inline
Assume V is not NULL.   

References PASS_MEM_STAT.

◆ vec_safe_insert()

template<typename T , typename A >
void vec_safe_insert ( vec< T, A, vl_embed > *& v,
unsigned ix,
const T &obj CXX_MEM_STAT_INFO )
inline
if V has no room for one more element, reallocate it.  Then call
V->quick_insert(IX, OBJ).   

References PASS_MEM_STAT, and vec_safe_reserve().

Referenced by decompose_param_expr(), and get_section_anchor().

◆ vec_safe_is_empty()

◆ vec_safe_iterate() [1/2]

◆ vec_safe_iterate() [2/2]

template<typename T , typename A >
bool vec_safe_iterate ( const vec< T, A, vl_embed > * v,
unsigned ix,
T * ptr )
inline

◆ vec_safe_length()

template<typename T , typename A >
unsigned vec_safe_length ( const vec< T, A, vl_embed > * v)
inline
If V is NULL, return 0.  Otherwise, return V->length().   

Referenced by add_cfis_to_fde(), add_decls_addresses_to_decl_constructor(), add_ehspec_entry(), add_freqcounting_predicate(), add_ranges_by_labels(), add_ranges_num(), generic_subrtx_iterator< T >::add_single_to_queue(), add_ttypes_entry(), addr_for_mem_ref(), addr_offset_valid_p(), adjust_insn(), strlen_pass::after_dom_children(), tree_switch_conversion::switch_conversion::array_value_type(), asan_add_global(), strlen_pass::before_dom_children(), build_abbrev_table(), build_call_expr_loc_vec(), build_call_vec(), build_nt_call_vec(), build_vector_from_ctor(), cfi_row_equal_p(), change_cfi_row(), cleanup_all_empty_eh(), cleanup_control_flow_pre(), ipa_param_body_adjustments::common_initialization(), compare_constant(), copy_debug_stmt(), copy_dwarf_procedure(), copy_function_or_variable(), coverage_obj_finish(), create_specialized_node(), dump_block_node(), dump_condition(), dump_final_node_vcg(), ipa_edge_args_sum_t::duplicate(), ipa_sra_function_summaries::duplicate(), dw2_output_call_site_table(), dw2_size_of_call_site_table(), dwarf2out_alloc_current_fde(), ipa_icf::sem_variable::equals(), ipa_call_context::estimate_size_and_time(), execute_omp_device_lower(), expand_omp_target(), expand_omp_taskreg(), expand_parallel_call(), expand_used_vars(), fill_vector_of_new_param_types(), find_base_value(), fix_reg_equiv_init(), free_param_decl_accesses(), gen_eh_landing_pad(), gen_eh_region(), ipa_param_adjustments::get_max_base_index(), ipa_param_body_adjustments::get_new_param_chain(), get_reg_known_equiv_p(), get_reg_known_value(), get_section_anchor(), get_strinfo(), ipa_param_adjustments::get_surviving_params(), ipa_param_adjustments::get_updated_indices(), gimple_build_asm_vec(), gimple_set_bb(), gimplify_init_constructor(), grow_reg_equivs(), init_ssa_renamer(), ipa_dump_adjusted_parameters(), ipa_fn_summary_write(), ipa_get_controlled_uses(), ipa_get_cs_argument_count(), ipa_get_param_count(), ipa_get_param_decl_index_1(), ipa_get_type(), ipa_jump_functions_equivalent_p(), ipa_write_jump_function(), ipcp_get_parm_bits(), label_to_block(), loop_depth(), loop_outer(), loop_outermost(), mark_ignored_debug_section(), cgraph_node::materialize_clone(), maybe_add_nop_after_section_switch(), ipa_param_adjustments::modify_call(), move_block_to_fn(), move_sese_region_to_fn(), number_of_loops(), omp_finish_file(), operand_compare::operand_equal_p(), optimize_abbrev_table(), optimize_compound_literals_in_ctor(), output_comp_unit(), output_eh_regions(), output_fde(), output_node_opt_summary(), output_offload_tables(), output_one_function_exception_table(), output_ssa_names(), output_struct_function_base(), ipa_icf::sem_function::param_used_p(), print_node(), qualified_die_p(), release_free_names_and_compact_live_names(), remap_freqcounting_preds_after_dup(), ipcp_transformation::remove_argaggs_if(), remove_unused_locals(), same_die_p(), set_reg_known_equiv_p(), set_reg_known_value(), set_strinfo(), simple_cst_equal(), size_of_aranges(), sjlj_build_landing_pads(), sjlj_output_call_site_table(), sjlj_size_of_call_site_table(), split_function(), sra_initialize(), strinfo_shared(), temp_slots_at_level(), tree_function_versioning(), ubsan_create_data(), update_clone_info(), update_row_reg_save(), use_distinct_base_address_for_range(), vec_safe_grow(), vec_safe_grow_cleared(), vec_safe_splice(), write_ipcp_transformation_info(), isra_func_summary::zap(), ipa_fn_summary::~ipa_fn_summary(), and isra_func_summary::~isra_func_summary().

◆ vec_safe_push()

template<typename T , typename A >
T * vec_safe_push ( vec< T, A, vl_embed > *& v,
const T &obj CXX_MEM_STAT_INFO )
inline
If V has no room for one more element, reallocate it.  Then call
V->quick_push(OBJ).   

References PASS_MEM_STAT, and vec_safe_reserve().

Referenced by add_call_site(), add_cfi(), add_cfis_to_fde(), add_condition(), add_const_value_attribute(), add_dwarf_attr(), add_ehspec_entry(), add_enumerator_pubname(), add_forwarder_blocks(), add_freqcounting_predicate(), add_local_decl(), add_pubname_string(), add_pubtype(), add_ranges_by_labels(), add_ranges_num(), generic_subrtx_iterator< T >::add_single_to_queue(), add_ttypes_entry(), add_type_duplicate(), assemble_alias(), assign_stack_local_1(), assign_stack_temp_for_type(), btf_collect_datasec(), build_abbrev_table(), build_translation_unit_decl(), cleanup_control_flow_pre(), connect_dest(), connect_src(), create_specialized_node(), detach_value(), discover_loop(), dwarf2out_alloc_current_fde(), dwarf2out_define(), expand_label(), expand_omp_target(), fixup_loop_arrays_after_move(), flow_loops_find(), force_label_rtx(), force_nonfallthru_and_redirect(), free_stmt_list(), gen_eh_landing_pad(), gen_eh_region(), varpool_node::get_create(), get_odr_type(), gimplify_asm_expr(), gimplify_bind_expr(), go_decl(), go_type_decl(), init_eh_for_function(), inline_read_section(), input_node_opt_summary(), input_offload_tables(), modref_access_node::insert(), modref_tree< T >::insert_base(), modref_base_node< T >::insert_ref(), loc_descriptor(), lower_omp_target(), make_ssa_name_fn(), mark_ignored_debug_section(), mem_loc_descriptor(), ipa_param_adjustments::modify_call(), new_alias_set(), omp_discover_declare_target_var_r(), omp_discover_implicit_declare_target(), output_macinfo_op(), place_block_symbol(), place_field(), place_new_loop(), push_sleb128(), push_uleb128(), record_dynamic_alloc(), record_final_call(), thunk_info::register_early(), register_odr_enum(), release_phi_node(), release_ssa_name_fn(), remap_decls(), self_referential_size(), simd_clone_adjust(), sjlj_emit_dispatch_table(), split_function(), tree_function_versioning(), ubsan_create_data(), unpack_ts_translation_unit_decl_value_fields(), used_types_insert(), rt_bb_visited::vset(), vt_add_function_parameter(), and vtbl_register_mangled_name().

◆ vec_safe_reserve() [1/2]

template<typename T , typename A >
bool vec_safe_reserve ( vec< T, A, vl_embed > *& v,
unsigned nelems,
bool exact = false CXX_MEM_STAT_INFO )
inline

◆ vec_safe_reserve() [2/2]

template<typename T >
bool vec_safe_reserve ( vec< T, va_heap, vl_ptr > *& v,
unsigned nelems,
bool exact = false CXX_MEM_STAT_INFO )
inline
If V does not have space for NELEMS elements, call
V->reserve(NELEMS, EXACT).   

◆ vec_safe_reserve_exact()

template<typename T , typename A >
bool vec_safe_reserve_exact ( vec< T, A, vl_embed > *& v,
unsigned nelems CXX_MEM_STAT_INFO )
inline

◆ vec_safe_space()

template<typename T , typename A >
bool vec_safe_space ( const vec< T, A, vl_embed > * v,
unsigned nelems )
inline
Convenience wrapper functions to use when dealing with pointers to
embedded vectors.  Some functionality for these vectors must be
provided via free functions for these reasons:

     1- The pointer may be NULL (e.g., before initial allocation).

     2- When the vector needs to grow, it must be reallocated, so
        the pointer will change its value.

Because of limitations with the current GC machinery, all vectors
in GC memory *must* be pointers.   
If V contains no room for NELEMS elements, return false. Otherwise,
return true.   

Referenced by vec_safe_reserve().

◆ vec_safe_splice()

template<typename T , typename A >
void vec_safe_splice ( vec< T, A, vl_embed > *& dst,
const vec< T, A, vl_embed > *src CXX_MEM_STAT_INFO )
inline
Copy the elements from SRC to the end of DST as if by memcpy.
Reallocate DST, if necessary.   

References PASS_MEM_STAT, vec_safe_length(), and vec_safe_reserve_exact().

Referenced by flush_ssaname_freelist().

◆ vec_safe_truncate()

template<typename T , typename A >
void vec_safe_truncate ( vec< T, A, vl_embed > * v,
unsigned size )
inline
If V is NULL, do nothing.  Otherwise, call V->truncate(SIZE).   

Referenced by cleanup_control_flow_pre(), expand_omp_target(), expand_omp_taskreg(), and flush_ssaname_freelist().

Variable Documentation

◆ vec_mem_usage_hash

htab_t vec_mem_usage_hash
extern
Hashtable mapping vec addresses to descriptors.   

◆ vNULL

vnull vNULL { }
constexpr

Referenced by _slp_tree::_slp_tree(), add_partition_graph_edge(), analyze_function_body(), assign_parms_augmented_arg_list(), build_region(), clone_inlined_nodes(), commutate(), cond_if_else_store_replacement(), cond_move_process_if_block(), copy_useful_known_contexts(), create_target_clone(), decide_whether_version_node(), determine_loop_nest_reuse(), df_worklist_dataflow_doublequeue(), discover_iteration_bound_by_body_walk(), do_estimate_edge_hints(), do_estimate_edge_size(), dr_analyze_indices(), ipa_fn_summary_t::duplicate(), ipa_cached_call_context::duplicate_from(), edge_info::edge_info(), estimate_ipcp_clone_size_and_time(), find_rarely_executed_basic_blocks_and_crossing_edges(), find_removable_extensions(), find_split_points(), finish_tm_clone_pairs(), flow_loop_nodes_find(), get_all_loop_exits(), get_loop_exit_edges_unique_dests(), get_loop_latch_edges(), get_odr_type(), get_tm_region_blocks(), ggc_pch_read(), gimplify_and_update_call_from_tree(), graphds_domtree(), graphds_scc(), gt_pch_save(), handle_common_deferred_options(), handle_deferred_dump_options(), hoist_code(), uninit_analysis::init_from_phi_def(), init_ggc(), init_reassoc(), init_var_map(), inline_read_section(), input_cgraph_1(), input_cgraph_opt_section(), input_node(), vect_optimize_slp_pass::internal_node_cost(), ipa_analyze_node(), ipa_get_nodes_in_cycle(), ipa_merge_modref_summary_after_inlining(), ipa_odr_read_section(), ipa_prop_read_section(), ipa_tm_create_version(), ipcp_transform_function(), ira_loop_tree_body_rev_postorder(), lower_cond(), lower_for(), lower_opt(), lto_input_mode_table(), lto_input_toplevel_asms(), lto_read_body_or_constructor(), make_invariant_chain(), make_rooted_chain(), vec_info::new_stmt_vec_info(), predicate::normalize(), predicate::normalize(), oacc_do_neutering(), parser::parse_c_expr(), parser::parse_for(), parser::parse_simplify(), parser::parser(), phi_translate_1(), possible_polymorphic_call_targets(), process_ipa_clobber(), predicate::push_pred(), read_replacements_section(), ipa_icf::sem_item_optimizer::read_section(), recursive_inlining(), relax_delay_slots(), remove_edge_and_dominated_blocks(), run_gcc(), self_referential_size(), simd_clone_create(), simplify_1a(), predicate::simplify_4(), simplify_using_ranges::simplify_using_ranges(), sjlj_emit_dispatch_table(), split_function(), vect_optimize_slp_pass::start_choosing_layouts(), tree_loop_unroll_and_jam(), update_dominators_in_loop(), valueize_shared_reference_ops_from_call(), valueize_shared_reference_ops_from_ref(), vect_analyze_slp(), vect_analyze_slp_instance(), vect_bb_vectorization_profitable_p(), vect_build_slp_instance(), vect_build_slp_tree(), vect_build_slp_tree_2(), vect_create_half_widening_stmts(), vect_create_new_slp_node(), vect_create_vectorized_promotion_stmts(), vect_get_slp_defs(), vect_slp_analyze_instance_dependence(), vect_slp_analyze_load_dependences(), vect_slp_analyze_store_dependences(), vect_slp_bbs(), vect_slp_check_for_roots(), vect_transform_grouped_load(), vectorizable_assignment(), vectorizable_bswap(), vectorizable_call(), vectorizable_comparison_1(), vectorizable_condition(), vectorizable_conversion(), vectorizable_load(), vectorizable_operation(), vectorizable_shift(), vectorizable_simd_clone_call(), vectorize_slp_instance_root_stmt(), and verify_non_ssa_vars().