GCC Middle and Back End API Reference
predict.h File Reference

Go to the source code of this file.

Enumerations

enum  br_predictor { END_PREDICTORS }
enum  prediction { NOT_TAKEN, TAKEN }

Functions

void predict_insn_def (rtx, enum br_predictor, enum prediction)
int counts_to_freqs (void)
void estimate_bb_frequencies (void)
const char * predictor_name (enum br_predictor)
tree build_predict_expr (enum br_predictor, enum prediction)
void tree_estimate_probability (void)
void compute_function_frequency (void)
void rebuild_frequencies (void)

Enumeration Type Documentation

Enumerator:
END_PREDICTORS 
enum prediction
Enumerator:
NOT_TAKEN 
TAKEN 

Function Documentation

tree build_predict_expr ( enum  br_predictor,
enum  prediction 
)
int counts_to_freqs ( void  )
Convert counts measured by profile driven feedback to frequencies.
   Return nonzero iff there was any nonzero execution count.   

References basic_block_def::count, and basic_block_def::frequency.

Referenced by compute_branch_probabilities(), estimate_bb_frequencies(), gimple_value_profile_transformations(), and rebuild_frequencies().

void predict_insn_def ( rtx  insn,
enum br_predictor  predictor,
enum prediction  taken 
)
Predict insn by given predictor.   

References predict_insn(), and TAKEN.

Referenced by bb_estimate_probability_locally(), and stack_protect_epilogue().

const char* predictor_name ( enum  br_predictor)
void rebuild_frequencies ( void  )
Rebuild function frequencies.  Passes are in general expected to
   maintain profile by hand, however in some cases this is not possible:
   for example when inlining several functions with loops freuqencies might run
   out of scale and thus needs to be recomputed.   

References add_noreturn_fake_exit_edges(), connect_infinite_loops_to_exit(), counts_to_freqs(), estimate_bb_frequencies(), loop_optimizer_finalize(), loop_optimizer_init(), mark_irreducible_loops(), PROFILE_GUESSED, PROFILE_READ, remove_fake_exit_edges(), timevar_pop(), and timevar_push().

Referenced by execute_function_todo(), and tree_function_versioning().