An experiment in generating branch-prediction hints. Enable them with
--branchpred=yes. I'm interested to know if these make a significant
difference for anyone - I see a small speed increase on the Pentium M.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2126 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index b409eea..9222f2e 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -586,6 +586,7 @@
Bool VG_(clo_chain_bb) = True;
Bool VG_(clo_show_below_main) = False;
Bool VG_(clo_pointercheck) = True;
+Bool VG_(clo_branchpred) = False;
static Bool VG_(clo_wait_for_gdb) = False;
@@ -692,6 +693,7 @@
" --optimise=no|yes improve intermediate code? [yes]\n"
" --profile=no|yes profile? (tool must be built for it) [no]\n"
" --chain-bb=no|yes do basic-block chaining? [yes]\n"
+" --branchpred=yes|no generate branch prediction hints [no]\n"
" --trace-codegen=<XXXXX> show generated code? (X = 0|1) [00000]\n"
" --trace-syscalls=no|yes show all system calls? [no]\n"
" --trace-signals=no|yes show signal handling details? [no]\n"
@@ -896,6 +898,11 @@
else if (VG_CLO_STREQ(argv[i], "--chain-bb=no"))
VG_(clo_chain_bb) = False;
+ else if (VG_CLO_STREQ(argv[i], "--branchpred=yes"))
+ VG_(clo_branchpred) = True;
+ else if (VG_CLO_STREQ(argv[i], "--branchpred=no"))
+ VG_(clo_branchpred) = False;
+
else if (VG_CLO_STREQ(argv[i], "--single-step=yes"))
VG_(clo_single_step) = True;
else if (VG_CLO_STREQ(argv[i], "--single-step=no"))