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

Go to the source code of this file.


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


void predict_insn_def (rtx, enum br_predictor, enum prediction)
int counts_to_freqs (void)
void estimate_bb_frequencies (bool)
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

     Upper bound on non-language-specific builtins.  
enum prediction

Function Documentation

tree build_predict_expr ( enum  br_predictor,
enum  prediction 
void compute_function_frequency ( void  )
   Decide whether function is hot, cold or unlikely executed.  
     Only first time try to drop function into unlikely executed.
     After inlining the roundoff errors may confuse us.
     Ipa-profile pass will drop functions only called from unlikely
     functions to unlikely and that is most of what we care about.  
int counts_to_freqs ( void  )
   Convert counts measured by profile driven feedback to frequencies.
   Return nonzero iff there was any nonzero execution count.  
void estimate_bb_frequencies ( bool  )
void predict_insn_def ( rtx  insn,
enum br_predictor  predictor,
enum prediction  taken 
   Predict insn by given predictor.  
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.  
     When the max bb count in the function is small, there is a higher
     chance that there were truncation errors in the integer scaling
     of counts by inlining and other optimizations. This could lead
     to incorrect classification of code as being cold when it isn't.
     In that case, force the estimation of bb counts/frequencies from the
     branch probabilities, rather than computing frequencies from counts,
     which may also lead to frequencies incorrectly reduced to 0. There
     is less precision in the probabilities, so we only do this for small
     max counts.  

Referenced by copy_static_chain().

void tree_estimate_probability ( void  )
   Predict branch probabilities and estimate profile of the tree CFG.
   This function can be called from the loop optimizers to recompute
   the profile information.  
     We use loop_niter_by_eval, which requires that the loops have