aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@gcc.gnu.org>2008-03-18 15:21:06 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2008-03-18 15:21:06 +0000
commit2e28e797125a94c7587b599eba438015fa02e5fe (patch)
treee2ca0569c078a0ce7bcb5fe80388985cdcfbfac8 /gcc/tree-pretty-print.c
parent52f1c7ed4d3ebab5b0b54f567bafbf1c29ccffeb (diff)
downloadgcc-2e28e797125a94c7587b599eba438015fa02e5fe.zip
gcc-2e28e797125a94c7587b599eba438015fa02e5fe.tar.gz
gcc-2e28e797125a94c7587b599eba438015fa02e5fe.tar.bz2
tree-pretty-print.c: Include predict.h.
* tree-pretty-print.c: Include predict.h. (dump_generic_node): Dump predictor. * tree.h (PREDICT_EXPR_OUTCOME, PREDICT_EXPR_PREDICTION): Update. * tree-gimple.c (is_gimple_stmt): Add PREDICT_EXPR. * gimple-low.c (lower_stmt): Likewise. * expr.c (expand_expr_real): Likewise. * predict.c (tree_bb_level_predictions): Use PREDICT_EXPRs and remove them. (build_predict_expr, build_predict_expr): New. * predict.h (predictor_name, build_predict_expr): Update. * c-typeck.c (c_finish_bc_stmt): Add prediction. * gimplify.c (gimplify_expr): Add PREDICT_EXPR. * predict.def (PRED_CONTINUE): Update hitrate. * tree.def (PREDICT_EXPR): Define. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark PREDICT_EXPR; do not handle BIND_EXPR. * tree-inline.c (estimate_num_insns_1): PREDICT_EXPR is free. * tree-cfg.c (verify_gimple_stmt): PREDICT_EXPR is valid. * tree-ssa-operands.c (get_expr_operands): PREDICT_EXPR takes no operands. From-SVN: r133313
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index b64571db..8b5f847 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "fixed-value.h"
#include "value-prof.h"
+#include "predict.h"
/* Local functions, macros and variables. */
static int op_prio (const_tree);
@@ -1592,6 +1593,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
is_expr = false;
break;
+ case PREDICT_EXPR:
+ pp_string (buffer, "// predicted ");
+ if (PREDICT_EXPR_OUTCOME (node))
+ pp_string (buffer, "likely by ");
+ else
+ pp_string (buffer, "unlikely by ");
+ pp_string (buffer, predictor_name (PREDICT_EXPR_PREDICTOR (node)));
+ pp_string (buffer, " predictor.");
+ break;
+
case RETURN_EXPR:
pp_string (buffer, "return");
op0 = TREE_OPERAND (node, 0);