Ping... anyone want to take a look? Andrew
On 09/29/2014 01:23 PM, Andrew MacLeod wrote:
On 09/16/2014 05:23 PM, Andrew MacLeod wrote:OK, here's take 2.. I left all the include files except ones which were duplicated as a result of the flattening. The first one was left, and any subsequent #Includes of the files were removed. we'll address "unneeded" includes separately and all at once.. perhaps with a newer tool that has been taught about input and output dependenciesOn 09/16/2014 05:12 PM, Joseph S. Myers wrote:Many of those files do in fact get numerous include files from expr.h, which are likely to get put back in when expr.h is flattened, but there is a risk as you point out.On Tue, 16 Sep 2014, Andrew MacLeod wrote:I did an include file reduction on all the language/*.[ch] and core *.[ch] files, but left the target files with the full complement of 7 includes that function.h use to have. Its probably easier when this is all done to fully reduce the targets one at a time... there are so many nooks and crannies I figured I'd bust something right now if i tried to do all the targets as wellHow did you determine what includes to remove? You appear to have removed tm.h includes from various files that do in fact use target macros; maybe:-)they get it indirectly included by some other header, but I thought a principle of this flattening was to avoid relying on such indirect inclusions. Because of possible use of target macros in #ifdef conditionals, "compiles with the include removed" is not a sufficient condition for removing it. cfgrtl.c gimple-fold.c mode-switching.c tree-inline.c vmsdbgout.c fortran/f95-lang.c fortran/trans-decl.c objc/objc-act.cPerhaps I should proceed by simply moving the includes and removing any duplicate includes, leaving the reduction for later date. There is less chance of that causing issues. I did forget about the discussion last year concerning target macros from the RTL end of things... My mind is slowly going :-).Bootstrapepd on x86_64-unknown-linux-gnu with no new regressions. Currently config-list.mk is building, but Im not expecting any issues there. assuming all is oK, ok to check in?Andrew PS.. the original commentary:This flattens function.h. It wasn't too bad, there were a few prototypes and defines in expr.h and rtl.h that belong in function.h, and a couple of other prototypes that belonged in other .h files. A bunch of the gen*.c generated files actually use function.h.. so they needed some tweaking.
function.patch.gz
Description: application/gzip