Flatten function.h

Andrew MacLeod amacleod@redhat.com
Tue Sep 16 19:20:00 GMT 2014


Im currently focusing on flattening middle/backend files which are 
included from front-ends files so we can clean up the include interface 
a bit.

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.

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 well :-)

Before the final commit, I will do an include reduction on 
ada/gcc-interface/misc.c... my previous build didnt have Ada enabled, so 
I missed the reduction there.

Bootstraps on x86_64-unknown-linux-gnu with no new test regressions (one 
plugin test required adding an include). I've also run all the targets 
in  config-list.mk and the ones that built seem to build fine, but its 
still running.. I'll verify before checking in.

for the record, this patch relocates the following include to where ever 
function.h is included from.  Any plugins which include function.h may 
want to add these to the include list just before function.h

#include "hashtab.h"
#include "hash-set.h"
#include "vec.h"
#include "machmode.h"
#include "tm.h"
#include "hard-reg-set.h"
#include "input.h"

OK for trunk?

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: function.diff
Type: text/x-patch
Size: 119974 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140916/17d3aac1/attachment.bin>


More information about the Gcc-patches mailing list