GCC Middle and Back End API Reference
value-prof.h File Reference

Go to the source code of this file.

Data Structures

struct  histogram_value_t

Typedefs

typedef struct histogram_value_thistogram_value
typedef struct histogram_value_tconst_histogram_value
typedef vec< histogram_valuehistogram_values

Enumerations

enum  hist_type {
  HIST_TYPE_INTERVAL, HIST_TYPE_POW2, HIST_TYPE_SINGLE_VALUE, HIST_TYPE_CONST_DELTA,
  HIST_TYPE_INDIR_CALL, HIST_TYPE_AVERAGE, HIST_TYPE_IOR, HIST_TYPE_MAX
}

Functions

void gimple_find_values_to_profile (histogram_values *)
bool gimple_value_profile_transformations (void)
histogram_value gimple_histogram_value (struct function *, gimple)
histogram_value gimple_histogram_value_of_type (struct function *, gimple, enum hist_type)
void gimple_add_histogram_value (struct function *, gimple, histogram_value)
void dump_histograms_for_stmt (struct function *, FILE *, gimple)
void gimple_remove_histogram_value (struct function *, gimple, histogram_value)
void gimple_remove_stmt_histograms (struct function *, gimple)
void gimple_duplicate_stmt_histograms (struct function *, gimple, struct function *, gimple)
void gimple_move_stmt_histograms (struct function *, gimple, gimple)
void verify_histograms (void)
void free_histograms (void)
void stringop_block_profile (gimple, unsigned int *, HOST_WIDE_INT *)
gimple gimple_ic (gimple, struct cgraph_node *, int, gcov_type, gcov_type)
void gimple_init_edge_profiler (void)
void gimple_gen_edge_profiler (int, edge)
void gimple_gen_interval_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_pow2_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_one_value_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_ic_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_ic_func_profiler (void)
void gimple_gen_const_delta_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_average_profiler (histogram_value, unsigned, unsigned)
void gimple_gen_ior_profiler (histogram_value, unsigned, unsigned)
void stream_out_histogram_value (struct output_block *, histogram_value)
void stream_in_histogram_value (struct lto_input_block *, gimple)
struct cgraph_nodefind_func_by_profile_id (int func_id)
void init_branch_prob (void)
void branch_prob (void)
void end_branch_prob (void)

Typedef Documentation


Enumeration Type Documentation

enum hist_type
Supported histogram types.   
Enumerator:
HIST_TYPE_INTERVAL 
HIST_TYPE_POW2 
HIST_TYPE_SINGLE_VALUE 
HIST_TYPE_CONST_DELTA 
HIST_TYPE_INDIR_CALL 
HIST_TYPE_AVERAGE 
HIST_TYPE_IOR 
HIST_TYPE_MAX 

Function Documentation

void branch_prob ( void  )
Instrument and/or analyze program behavior based on program the CFG.

   This function creates a representation of the control flow graph (of
   the function being compiled) that is suitable for the instrumentation
   of edges and/or converting measured edge counts to counts on the
   complete CFG.

   When FLAG_PROFILE_ARCS is nonzero, this function instruments the edges in
   the flow graph that are needed to reconstruct the dynamic behavior of the
   flow graph.  This data is written to the gcno file for gcov.

   When FLAG_BRANCH_PROBABILITIES is nonzero, this function reads auxiliary
   information from the gcda file containing edge count information from
   previous executions of the function being compiled.  In this case, the
   control flow graph is annotated with actual execution counts by
   compute_branch_probabilities().

   Main entry point of this file.   

References add_noreturn_fake_exit_edges(), alloc_aux_for_edges(), BUILT_IN_NORMAL, compact_blocks(), compute_branch_probabilities(), compute_value_histograms(), edge_def::count, coverage_begin_function(), coverage_compute_cfg_checksum(), coverage_compute_lineno_checksum(), coverage_counter_alloc(), coverage_end_function(), create_edge_list(), curr_location, current_function_decl, edge_def::dest, dump_file, expand_location(), find_spanning_tree(), first, edge_def::flags, flow_call_edges_add(), free_aux_for_edges(), free_edge_list(), gcov_write_length(), gcov_write_string(), gcov_write_tag(), gcov_write_unsigned(), gimple_call_flags(), gimple_call_fndecl(), gimple_filename(), gimple_find_values_to_profile(), gimple_has_location(), gimple_init_edge_profiler(), gimple_lineno(), gimple_location(), edge_def::goto_locus, gsi_after_labels(), gsi_commit_edge_inserts(), gsi_end_p(), gsi_last_nondebug_bb(), gsi_next(), gsi_next_nondebug(), gsi_prev_nondebug(), gsi_start_bb(), gsi_stmt(), edge_info::ignore, basic_block_def::index, instrument_edges(), instrument_values(), is_gimple_call(), is_gimple_debug(), last, make_edge(), basic_block_def::next_bb, edge_list::num_edges, offset, edge_info::on_tree, output_location(), basic_block_def::preds, remove_fake_edges(), single_succ_edge(), single_succ_p(), split_block_after_labels(), split_edge(), edge_def::src, basic_block_def::succs, total_num_blocks, total_num_edges, total_num_edges_ignored, total_num_edges_instrumented, and total_num_times_called.

Referenced by tree_profiling().

void dump_histograms_for_stmt ( struct function ,
FILE *  ,
gimple   
)
struct cgraph_node* find_func_by_profile_id ( int  func_id)
read
void free_histograms ( void  )

References cfun, and free_hist().

Referenced by gimple_expand_cfg(), and release_function_body().

void gimple_add_histogram_value ( struct function fun,
gimple  stmt,
histogram_value  hist 
)
void gimple_find_values_to_profile ( histogram_values )
void gimple_gen_average_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
void gimple_gen_const_delta_profiler ( histogram_value  value,
unsigned  tag,
unsigned  base 
)
Output instructions as GIMPLE trees for code to find the most common value
   of a difference between two evaluations of an expression.
   VALUE is the expression whose value is profiled.  TAG is the tag of the
   section for counters, BASE is offset of the counter position.   

References internal_error().

Referenced by instrument_values().

void gimple_gen_edge_profiler ( int  ,
edge   
)
void gimple_gen_ic_func_profiler ( void  )
void gimple_gen_ic_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
void gimple_gen_interval_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
void gimple_gen_ior_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
void gimple_gen_one_value_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
void gimple_gen_pow2_profiler ( histogram_value  ,
unsigned  ,
unsigned   
)
histogram_value gimple_histogram_value ( struct function ,
gimple   
)
void gimple_move_stmt_histograms ( struct function ,
gimple  ,
gimple   
)
void gimple_remove_stmt_histograms ( struct function ,
gimple   
)
void init_branch_prob ( void  )
void stream_in_histogram_value ( struct lto_input_block ,
gimple   
)
void stream_out_histogram_value ( struct output_block ,
histogram_value   
)