This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Flatten tree-ssa.h
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>, Diego Novillo <dnovillo at google dot com>
- Date: Wed, 23 Oct 2013 12:00:03 +0200
- Subject: Re: [patch] Flatten tree-ssa.h
- Authentication-results: sourceware.org; auth=none
- References: <526740BF dot 3060300 at redhat dot com>
On Wed, Oct 23, 2013 at 5:21 AM, Andrew MacLeod <email@example.com> wrote:
> When moving all the prototypes out of tree-flow.h and into individual
> files, the "kitchen sink" #include list temporarily propagated it way into
> the new tree-ssa.h file. tree-ssa.h is now in a position to contain only
> it's own prototypes.
> Its include list was:
> #include "bitmap.h"
> #include "gimple.h"
> #include "gimple-ssa.h"
> #include "cgraph.h"
> #include "tree-cfg.h"
> #include "tree-phinodes.h"
> #include "ssa-iterators.h"
> #include "tree-ssanames.h"
> #include "tree-ssa-loop.h"
> #include "tree-into-ssa.h"
> #include "tree-dfa.h"
> This patch flattens tree-ssa.h so that it no longer includes *any* of those
> include files. The process, mostly automated:
> 1 - takes all the #include's from tree-ssa.h and copies them immediately
> before #include "tree-ssa.h" in every .c file which includes it.
> 2 - Remove each of those include files (as well as tree-ssa.h) one at a time
> from the .c file (bottom up) and tries to compile it.
> 3 - Removes any which cause no compilation failures.
> This way each .c file gets only the includes it actually needed from
> tree-ssa.h, and often doesn't even require tree-ssa.h itself. I haven't
> touched any existing includes unless they formed a duplicate of those copied
> from tree-ssa.h. (and that happens)
> This touches 147 files (!!!) which included tree-ssa.h.... only 40 still
> need tree-ssa.h.
> tree-ssa.h had 11 include files and the average .c file ended up requiring
> only 3.
> bootstraps on x86_64-unknown-linux-gnu with no new regressions. OK?