This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] cfg.texi needs reviewing by a native speaker (Was: Re: "Documentation by paper")
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: law at redhat dot com
- Cc: Steven Bosscher <stevenb at suse dot de>, Robert Dewar <dewar at gnat dot com>,Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-patches at gcc dot gnu dot org,jh at suse dot cz, dnovillo at redhat dot com
- Date: Wed, 4 Feb 2004 23:45:16 +0100
- Subject: Re: [tree-ssa] cfg.texi needs reviewing by a native speaker (Was: Re: "Documentation by paper")
- References: <firstname.lastname@example.org> <200402042237.i14MbCDs003070@speedy.slc.redhat.com>
> In message <email@example.com>, Steven Bosscher writes:
> >On Wednesday 04 February 2004 20:09, Robert Dewar wrote:
> >> Joe Buck wrote:
> >> > OK, the *best* would be written by that almost non-existent programmer
> >> > who combines a love of writing clear English prose with the extraordinary
> >> > discipline required to do it first and keep it current. But since this
> >> > species is almost non-existent, you need to read my phrase "best
> >> > documentation" for "best documentation achievable in practice".
> >> You are FAR too pessimistic, I know lots of programmers who meet
> >> these criteria.
> >I most certainly don't qualify for Joe's description. I'm sure one
> >of you does, and since part of this discussion was about documenting
> >what a basic block is, I kindly ask you, as native speakers who care
> >about good documentation, to review this new chapter for the manual.
> >It's based on Jan Hubicka's old cfg.texi, which he&others wrote after
> >doing a lot of work on the CFG representation in GCC. That document
> >is almost three years old now, but it was never reviewed (not even by
> >the people in this thread who say they care about documentation). I
> >don't claim it's perfect -- on the contrary. But does it look like
> >an acceptable start?
> > * cfg.texi: New chapter for the internals manual. Briefly describes
> > the data structures used to represent the control flow graph, and
> > the issues and API to modify and maintain the CFG.
> Funny -- I was looking for some of this just the other day (frequency stuff).
> Now what we need is better documentation of things like the algorithms we're
> using to do prediction & frequency computation/propagation. :-)
It is one of topics I am considering for gccsummit (other one I am
considering is cgraph code that will proably win this time as I still do
plan to extend the profiling for inlining and would like to cover it
However the algorithm itself match almost perfectly the Wu & Larus
approach described in the linked paper. It is natural enough - you are
simply walking the inner loops as acyclic regions and compute the
frequency of loopback edge. Then you get to outer loop and multiply the
frequency of header block of inner loop accordingly.
The interfaces to predictors are different tought, but I hope these are
documented well enough.