diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-01-06 17:10:09 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-01-06 16:10:09 +0000 |
commit | 350de209bfd0c368ce590f89f59d8950e4bc29b4 (patch) | |
tree | 2020de3672e60c9c0419dd8af6df627911d53051 | |
parent | 12e917fff2800a4bfd591d09675b21e71ae8bc75 (diff) | |
download | gcc-350de209bfd0c368ce590f89f59d8950e4bc29b4.zip gcc-350de209bfd0c368ce590f89f59d8950e4bc29b4.tar.gz gcc-350de209bfd0c368ce590f89f59d8950e4bc29b4.tar.bz2 |
re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of SPEC2000 GAP)
PR middle-end/77484
* predict.def (PRED_POLYMORPHIC_CALL): Set to 58
* predict.c (tree_estimate_probability_bb): Reverse direction of
polymorphic call predictor.
From-SVN: r244167
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/predict.c | 2 | ||||
-rw-r--r-- | gcc/predict.def | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4911025..cc9c11c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-01-01 Jan Hubicka <hubicka@ucw.cz> + + PR middle-end/77484 + * predict.def (PRED_POLYMORPHIC_CALL): Set to 58 + * predict.c (tree_estimate_probability_bb): Reverse direction of + polymorphic call predictor. + 2017-01-06 David Malcolm <dmalcolm@redhat.com> * passes.c (execute_one_pass): Split out pass-skipping logic diff --git a/gcc/predict.c b/gcc/predict.c index f851e14..fa4e626 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2789,7 +2789,7 @@ tree_estimate_probability_bb (basic_block bb) if (gimple_call_fndecl (stmt)) predict_edge_def (e, PRED_CALL, NOT_TAKEN); else if (virtual_method_call_p (gimple_call_fn (stmt))) - predict_edge_def (e, PRED_POLYMORPHIC_CALL, TAKEN); + predict_edge_def (e, PRED_POLYMORPHIC_CALL, NOT_TAKEN); else predict_edge_def (e, PRED_INDIR_CALL, TAKEN); break; diff --git a/gcc/predict.def b/gcc/predict.def index b6b2a40..5ddb36a 100644 --- a/gcc/predict.def +++ b/gcc/predict.def @@ -122,7 +122,7 @@ DEF_PREDICTOR (PRED_CALL, "call", HITRATE (55), 0) less reliable for indirect calls and polymorphic calls. For spec2k6 the predictio nis slightly in the direction of taking the call. */ DEF_PREDICTOR (PRED_INDIR_CALL, "indirect call", HITRATE (51), 0) -DEF_PREDICTOR (PRED_POLYMORPHIC_CALL, "polymorphic call", HITRATE (58), 0) +DEF_PREDICTOR (PRED_POLYMORPHIC_CALL, "polymorphic call", HITRATE (59), 0) /* Recursive calls are usually not taken or the function will recurse indefinitely. */ |