GCC Middle and Back End API Reference
vec.c File Reference

Data Structures

struct  vec_descriptor
struct  ptr_hash_entry

Functions

static hashval_t hash_descriptor ()
static int eq_descriptor ()
static hashval_t hash_ptr ()
static int eq_ptr ()
static struct vec_descriptorvec_descriptor ()
void register_stack_vec ()
int stack_vec_register_index ()
void unregister_stack_vec ()
static int cmp_statistic ()
static int add_statistics ()
void dump_vec_loc_statistics ()

Variables

vnull vNULL
static htab_t vec_desc_hash
static htab_t ptr_hash
static vec< void * > stack_vecs
static struct vec_descriptor ** loc_array

Function Documentation

static int add_statistics ( )
static

Referenced by dump_vec_loc_statistics().

static int cmp_statistic ( )
static
Helper for qsort; sort descriptors by amount of memory consumed.   

References vec_descriptor::allocated, vec_descriptor::peak, and vec_descriptor::times.

Referenced by dump_vec_loc_statistics().

static int eq_descriptor ( )
static
static int eq_ptr ( )
static
static hashval_t hash_descriptor ( )
static
Hashtable helpers.   

References vec_descriptor::file, and vec_descriptor::line.

Referenced by vec_descriptor().

static hashval_t hash_ptr ( )
static
Hash table helpers functions.   

References ptr_hash_entry::ptr.

Referenced by vec_prefix::register_overhead().

void register_stack_vec ( )
Add a stack vector to STACK_VECS.   

Referenced by va_stack::alloc().

int stack_vec_register_index ( )
If VEC is registered in STACK_VECS, return its index.
   Otherwise, return -1.   

Referenced by va_stack::release(), and va_stack::reserve().

void unregister_stack_vec ( )
Remove vector at slot IX from the list of registered stack vectors.   

Referenced by va_stack::release(), and va_stack::reserve().

static struct vec_descriptor* vec_descriptor ( )
staticread
Return descriptor for given call site, create new one if needed.   

References eq_descriptor(), vec_descriptor::file, vec_descriptor::function, hash_descriptor(), vec_descriptor::line, and vec_desc_hash.

Referenced by vec_prefix::register_overhead().


Variable Documentation

struct vec_descriptor** loc_array
static
Collect array of the descriptors from hashtable.   
htab_t ptr_hash
static
Hashtable converting address of allocated field to loc descriptor.   

Referenced by vec_prefix::register_overhead(), and vec_prefix::release_overhead().

vec<void *> stack_vecs
static
Stack vectors are a little different.  VEC_alloc turns into a call
   to vec<T, A>::stack_reserve and passes in space allocated via a
   call to alloca.  We record that pointer so that we know that we
   shouldn't free it.  If the vector is resized, we resize it on the
   heap.  We record the pointers in a vector and search it in LIFO
   order--i.e., we look for the newest stack vectors first.  We don't
   expect too many stack vectors at any one level, and searching from
   the end should normally be efficient even if they are used in a
   recursive function.   
htab_t vec_desc_hash
static
Hashtable mapping vec addresses to descriptors.   

Referenced by dump_vec_loc_statistics(), and vec_descriptor().

vnull vNULL
@verbatim Vector API for GNU compiler.

Copyright (C) 2004-2013 Free Software Foundation, Inc. Contributed by Nathan Sidwell natha.nosp@m.n@co.nosp@m.desou.nosp@m.rcer.nosp@m.y.com Re-implemented in C++ by Diego Novillo dnovi.nosp@m.llo@.nosp@m.googl.nosp@m.e.co.nosp@m.m

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 file is compiled twice: once for the generator programs
   once for the compiler.   
vNULL is an empty type with a template cast operation that returns
   a zero-initialized vec<T, A, L> instance.  Use this when you want
   to assign nil values to new vec instances or pass a nil vector as
   a function call argument.

   We use this technique because vec<T, A, L> must be PODs (they are
   stored in unions and passed in vararg functions), this means that
   they cannot have ctors/dtors.   

Referenced by agg_replacements_to_vector(), assign_parms_augmented_arg_list(), classify_partition(), clone_inlined_nodes(), collect_callers_of_node(), compute_avail(), compute_data_dependences_for_bb(), cond_if_else_store_replacement(), cond_move_process_if_block(), vec< T, A, vl_ptr >::copy(), copy_plats_to_inter(), create_reference_ops_from_call(), create_variable_info_for(), create_variable_info_for_1(), decide_whether_version_node(), determine_loop_nest_reuse(), df_worklist_dataflow_doublequeue(), DFS(), discover_iteration_bound_by_body_walk(), do_estimate_edge_hints(), do_estimate_edge_size(), do_partial_partial_insertion(), do_regular_insertion(), do_structure_copy(), dot_scop(), dr_analyze_indices(), eliminate_indirect_cycles(), emit_case_bit_tests(), estimate_function_body_sizes(), estimate_ipcp_clone_size_and_time(), evaluate_properties_for_edge(), execute_cse_sincos_1(), execute_late_warn_uninitialized(), expand_used_vars(), extract_and_process_scc_for_name(), find_aggregate_values_for_callers_subset(), find_def_preds(), find_func_aliases(), find_func_aliases_for_builtin_call(), find_func_aliases_for_call(), find_func_clobbers(), find_predicates(), find_rarely_executed_basic_blocks_and_crossing_edges(), find_removable_extensions(), find_split_points(), finish_tm_clone_pairs(), flow_loop_nodes_find(), gen_producer_string(), get_all_loop_exits(), get_constraint_for_1(), get_dominated_by(), get_dominated_by_region(), get_dominated_to_depth(), get_loop_exit_edges(), get_loop_exit_edges_unique_dests(), get_loop_hot_path(), get_loop_latch_edges(), get_odr_type(), get_tm_region_blocks(), graphds_domtree(), graphds_scc(), graphite_transform_loops(), gt_pch_save(), handle_common_deferred_options(), handle_const_call(), handle_lhs_call(), handle_rhs_call(), hoist_code(), init_reassoc(), inline_merge_summary(), inline_node_duplication_hook(), inline_read_section(), inline_small_functions(), inline_update_overall_summary(), input_cgraph_1(), input_cgraph_opt_section(), input_node(), ipa_get_nodes_in_cycle(), ipa_prop_read_section(), ipa_tm_create_version(), ipa_tm_transform_calls(), ipcp_discover_new_direct_edges(), ipcp_transform_function(), ira_loop_tree_body_rev_postorder(), ira_traverse_loop_tree(), lower_eh_dispatch(), lto_input_toplevel_asms(), lto_read_body(), lto_symtab_merge_decls_2(), make_constraint_to(), maybe_lower_iteration_bound(), maybe_optimize_range_tests(), maybe_unwind_expanded_macro_loc(), minimize_DFA(), normalize_preds(), phi_translate_1(), possible_polymorphic_call_targets(), process_ipa_clobber(), propagate_threaded_block_debug_into(), reachable_at_most_once(), read_replacements_section(), reassociate_bb(), recursive_inlining(), remove_edge_and_dominated_blocks(), self_referential_size(), sjlj_emit_dispatch_table(), split_function(), stmt_has_simple_data_refs_p(), thread_across_edge(), thread_prologue_and_epilogue_insns(), tm_region_init(), tree_call_cdce(), tree_loop_distribution(), tree_predictive_commoning_loop(), tree_transform_and_unroll_loop(), try_combine_chains(), try_unroll_loop_completely(), unschedule_insns_until(), update_call_from_tree(), update_dominators_in_loop(), valueize_shared_reference_ops_from_call(), valueize_shared_reference_ops_from_ref(), vect_analyze_slp(), vect_analyze_slp_instance(), vect_build_slp_tree(), vect_create_epilog_for_reduction(), vect_create_new_slp_node(), vect_create_vectorized_promotion_stmts(), vect_get_slp_defs(), vect_slp_analyze_data_ref_dependences(), vect_supported_load_permutation_p(), vect_transform_grouped_load(), vectorizable_assignment(), vectorizable_call(), vectorizable_condition(), vectorizable_conversion(), vectorizable_load(), vectorizable_operation(), vectorizable_reduction(), vectorizable_shift(), vectorizable_store(), verify_non_ssa_vars(), vn_phi_insert(), and vn_reference_lookup_3().