This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Profiling infrastructure TLC (1/n)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 Jul 2012 10:41:05 +0200
- Subject: Re: [patch] Profiling infrastructure TLC (1/n)
- References: <CABu31nN_RZoHofAwaS7Xs=u-6QLg-46Yx5jyN=41jkVoco8j3w@mail.gmail.com>
On Sun, Jul 22, 2012 at 12:40 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> This patch cleans up some "interesting" things in GCC's profiling
> support. The most significant changes are the removal of
> BB_TO_GCOV_INDEX and after_tree_profile. Another visible cleanup is
> that -profile-generate no longer sets
> flag_value_profile_transformations.
>
> The rest is mostly just comment updates, because the comments (and the
> code, see BB_TO_GCOV_INDEX ;-) have not been maintained very well for
> everything that has changed since, oh, tree-ssa was merged?
>
> For example, in value-prof.c:"the flow graph is annotated with actual
> execution counts, which are later propagated into the rtl for
> optimization purposes."
>
> Or before profile.c:branch_prob():
> -/* Instrument and/or analyze program behavior based on program flow graph.
> - In either case, this function builds a flow graph for the function being
> - compiled. The flow graph is stored in BB_GRAPH.
> ...
> - (...) In this case, the flow graph is
> - annotated with actual execution counts, which are later propagated into the
> - rtl for optimization purposes.
>
> But (a) branch_prob doesn't build a CFG; (b) the flow graph it doesn't
> build is not stored in BB_GRAPH; and (c) the execution counts are not
> "propagated into the rtl".
>
> The whole profiling infrastructure needs a lot of TLC before it looks
> somewhat decent again. This is just the first step :-)
>
> Bootstrapped and tested on powerpc64-unknown-linux-gnu.
> Profilebootstrapped and tested on x86_64-unknown-linux-gnu.
> OK for trunk?
Ok.
Thanks,
Richard.
> Ciao!
> Steven