1*e4b17023SJohn Marino /* Definitions for branch prediction routines in the GNU compiler. 2*e4b17023SJohn Marino Copyright (C) 2001, 2003, 2004, 2007, 2008, 2010 3*e4b17023SJohn Marino Free Software Foundation, Inc. 4*e4b17023SJohn Marino 5*e4b17023SJohn Marino This file is part of GCC. 6*e4b17023SJohn Marino 7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under 8*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free 9*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later 10*e4b17023SJohn Marino version. 11*e4b17023SJohn Marino 12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or 14*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15*e4b17023SJohn Marino for more details. 16*e4b17023SJohn Marino 17*e4b17023SJohn Marino You should have received a copy of the GNU General Public License 18*e4b17023SJohn Marino along with GCC; see the file COPYING3. If not see 19*e4b17023SJohn Marino <http://www.gnu.org/licenses/>. */ 20*e4b17023SJohn Marino 21*e4b17023SJohn Marino #ifndef GCC_PREDICT_H 22*e4b17023SJohn Marino #define GCC_PREDICT_H 23*e4b17023SJohn Marino 24*e4b17023SJohn Marino #define DEF_PREDICTOR(ENUM, NAME, HITRATE, FLAGS) ENUM, 25*e4b17023SJohn Marino enum br_predictor 26*e4b17023SJohn Marino { 27*e4b17023SJohn Marino #include "predict.def" 28*e4b17023SJohn Marino 29*e4b17023SJohn Marino /* Upper bound on non-language-specific builtins. */ 30*e4b17023SJohn Marino END_PREDICTORS 31*e4b17023SJohn Marino }; 32*e4b17023SJohn Marino #undef DEF_PREDICTOR 33*e4b17023SJohn Marino enum prediction 34*e4b17023SJohn Marino { 35*e4b17023SJohn Marino NOT_TAKEN, 36*e4b17023SJohn Marino TAKEN 37*e4b17023SJohn Marino }; 38*e4b17023SJohn Marino 39*e4b17023SJohn Marino extern void predict_insn_def (rtx, enum br_predictor, enum prediction); 40*e4b17023SJohn Marino extern int counts_to_freqs (void); 41*e4b17023SJohn Marino extern void estimate_bb_frequencies (void); 42*e4b17023SJohn Marino extern const char *predictor_name (enum br_predictor); 43*e4b17023SJohn Marino extern tree build_predict_expr (enum br_predictor, enum prediction); 44*e4b17023SJohn Marino extern void tree_estimate_probability (void); 45*e4b17023SJohn Marino extern void compute_function_frequency (void); 46*e4b17023SJohn Marino extern void rebuild_frequencies (void); 47*e4b17023SJohn Marino 48*e4b17023SJohn Marino #endif /* GCC_PREDICT_H */ 49