This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[patch 0/9] Flattening and initial module rebuilding


This is a series of 9 patches which does some flattening, some module building, and some basic cleanups.

I am presenting them as 9 patches for easier review. The latter couple of patches affect a lot of the same files that follow on patches then adjust, I've decided NOT to put the automated changes in with each of those patches.

There are 8 patches showing the key changes, and then the 9th patch is an aggregate of the first 8 key changes, plus the final result of the impact on all the source files. This is the only patch I'd like to commit.

The automated tools which generate the source changes have been significantly enhanced. When a header is flattened, the source file is checked for the existence of the headers which need moving, and any which are already present are left if they are in the right order. Any duplicate are also removed.

A similar process is used when an aggregation file like backend.h or ssa.h is processed. Any occurrences of the aggregated headers are removed from the source file so there are no duplicates. The aggregated headers are typically only placed in a source file if 3 or more of the headers would be replaced. (ie, if only bitmap.h is included, I don't just blindly put backend.h in the file.) This number came from analysis of a fully flattened and include-reduced tree, and seemed to be the sweet spot.

With the aggregation and flattening, the order of some includes can get shifted around with other files in between, so the tools also ensure there is a "blessed" order which will make sure than any pre-reqs are always available. Right now, its primarily:

config.h
system.h
coretypes.h
backend.h
tree.h
gimple.h
rtl.h
df.h
ssa.h

And if any of the aggregators are not present, then any headers which make up the aggregator are in the same relative position.

The tools actually produced all these patches with no tweaking to solve compilation failures.. which was very helpful. The old ones needed some guidance and were a bit finicky.

I can adjust any of this quite easily, or present them in a different way if you don't like it this way. Again, my goal is to check in just the final patch which does all the work of first 8 patches. It would be a lot less turmoil on the branch. I can do it in smaller chunks if need be.

Andrew


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