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
flat3.patch.gz
Description: application/gzip