This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Flatten tree-ssa.h

On Wed, Oct 23, 2013 at 5:21 AM, Andrew MacLeod <> 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?



> Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]