aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-04-17 09:49:00 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-04-17 09:49:00 -0700
commit994a57cd287e37aaaf909fc1ae671e54b1b360c4 (patch)
tree463f2ea9fd7c3ba92418e1563975dde99f0150de /gcc/toplev.c
parent2be5e524b0ce96881e40a84d0355f40edd82e07e (diff)
downloadgcc-994a57cd287e37aaaf909fc1ae671e54b1b360c4.zip
gcc-994a57cd287e37aaaf909fc1ae671e54b1b360c4.tar.gz
gcc-994a57cd287e37aaaf909fc1ae671e54b1b360c4.tar.bz2
builtins.c (expand_builtin_expect): New.
* builtins.c (expand_builtin_expect): New. (expand_builtin): Call it. * builtins.def (BUILT_IN_EXPECT): New. * c-common.c (c_common_nodes_and_builtins): Declare __builtin_expect. * extend.texi: Document it. * predict.c (expected_value_to_br_prob): New. (find_expected_value): New. * basic-block.h (expected_value_to_br_prob): Declare. * toplev.c (rest_of_compilation): Invoke it. * rtl.h (NOTE_EXPECTED_VALUE): New. (NOTE_INSN_EXPECTED_VALUE): New. * rtl.c (note_insn_name): Update. * print-rtl.c (print_rtx): Reorg NOTE_LINE_NUMBER special cases; handle NOTE_INSN_EXPECTED_VALUE. From-SVN: r33211
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 6d8336d..4f9a385 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2893,9 +2893,10 @@ rest_of_compilation (decl)
goto exit_rest_of_compilation;
}
+ init_EXPR_INSN_LIST_cache ();
+
/* We may have potential sibling or tail recursion sites. Select one
(of possibly multiple) methods of performing the call. */
- init_EXPR_INSN_LIST_cache ();
if (flag_optimize_sibling_calls)
optimize_sibling_and_tail_recursive_calls ();
@@ -2962,6 +2963,10 @@ rest_of_compilation (decl)
of the function. */
TIMEVAR (jump_time,
{
+ /* Turn NOTE_INSN_EXPECTED_VALUE into REG_BR_PROB. Do this
+ before jump optimization switches branch directions. */
+ expected_value_to_br_prob ();
+
reg_scan (insns, max_reg_num (), 0);
jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES,
JUMP_AFTER_REGSCAN);