From: Jan Hubicka Date: Fri, 6 Jan 2017 16:10:09 +0000 (+0100) Subject: re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of SPEC2000... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=350de209bfd0c368ce590f89f59d8950e4bc29b4;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4911025e7db..cc9c11ce2b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-01-01 Jan Hubicka + + 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 * passes.c (execute_one_pass): Split out pass-skipping logic diff --git a/gcc/predict.c b/gcc/predict.c index f851e14b4ed..fa4e626fab8 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 b6b2a402b22..5ddb36a0b2c 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. */