summaryrefslogtreecommitdiff
path: root/gcc/predict.def
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-06 18:57:27 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-06 18:57:27 +0000
commit5de92639376d02c091b93418f3d4a0b25b92c26f (patch)
tree6db0f16a08d3e0f5d8feea8a59bd2d27420fa52d /gcc/predict.def
parent4ea69e9efb4ab33b0ce910662afedbc496d319fa (diff)
downloadgcc-5de92639376d02c091b93418f3d4a0b25b92c26f.tar.gz
* errors.h (warning, error, fatal, internal_error): Mark as cold.
* predict.c (maybe_hot_bb): Cold functions are never hot; hot functions are hot. (probably_cold_bb_p): Cold functions are cold. (probably_never_executed_bb_p): Cold functions are cold. (tree_bb_level_predictions): Predict calls to cold functions as not taken. (compute_function_frequency): Check hot/cold attributes. * function.h (function_frequency): Update comments. * predict.def (PRED_COLD_FUNCTION): Predict cold function. * c-common.c (handle_hot_attribute, handle_cold_attribute): New. (c_common_att): Add cold and hot. * doc/extend.texi (hot,cold attributes): Document. * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/predict.def')
-rw-r--r--gcc/predict.def4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/predict.def b/gcc/predict.def
index ac6777cc16b..cf31442c175 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -73,6 +73,10 @@ DEF_PREDICTOR (PRED_CONTINUE, "continue", HITRATE (56), 0)
DEF_PREDICTOR (PRED_NORETURN, "noreturn call", HITRATE (99),
PRED_FLAG_FIRST_MATCH)
+/* Branch to basic block containing call marked by cold function attribute. */
+DEF_PREDICTOR (PRED_COLD_FUNCTION, "cold function call", HITRATE (99),
+ PRED_FLAG_FIRST_MATCH)
+
/* Loopback edge is taken. */
DEF_PREDICTOR (PRED_LOOP_BRANCH, "loop branch", HITRATE (86),
PRED_FLAG_FIRST_MATCH)