This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix dumping of branch predictor hitrates
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Martin LiÅka <mliska at suse dot cz>
- Date: Sun, 17 Apr 2016 10:51:39 -0700
- Subject: Re: Fix dumping of branch predictor hitrates
- Authentication-results: sourceware.org; auth=none
- References: <20160417161305 dot GC69067 at kam dot mff dot cuni dot cz>
On Sun, Apr 17, 2016 at 9:13 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch fixes infrastructure used by branch prediction code to collect
> information about prediction hitrates that is needed to verify their
> performance.
>
> We used to read profile first and then do profile estimation, nowdays passes
> are run in the opposite order. Because dumping happens during estimation, we
> no longer get the information. This patch simply re-runs the branch prediction
> w/o modifying the profile when -fdump-ipa-profile is used.
>
> Profile estimation and maintenance code was not very actively developed
> in recent years and there are some dead ends. This stage 1 I would like to fix
> them, update the APIs to be more robust and use sreals instaed of fixedpoint
> arithmetics.
>
> Bootstrapped/regtested x86_64-linux, comitted.
>
> Honza
>
> * predict.c (combine_predictions_for_bb): Add dry_run parmaeter.
> (tree_estimate_probability): Likewise.
> (pass_profile::execute): Update.
> (report_predictor_hitrates): New function.
> * profile.c (compute_branch_probabilities): Use it.
> * predict.h (report_predictor_hitrates): Declare.
>
> * analyze_brprob: Update comment.
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70706
--
H.J.