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]

Re: [patch] Finish cleaning up gimple.h


On 11/15/13 12:41, Andrew MacLeod wrote:
On 11/15/2013 01:32 PM, Jeff Law wrote:
On 11/15/13 09:47, Andrew MacLeod wrote:
This patch finally gets gimple.h into its proper state of only having
prototypes for gimple.c.

The prototype for get_base_address was in tree.h, and it seemed more
appropriate there since gimple.h is for gimple statements.  I moved the
function to tree.c

2 new .h files were created,  cfgexpand.h and tree-nested.h.   I flushed
both of those out to include all the exports for the files, so the
'build_addr' prototype was moved from tree.h and
'estimated_stack_frame_size' was moved from tree-inline.h. I looked at
shuffling the exports to other files, but nothing jumped at me.
estimated_stack_frame_size depends on too much other stuff in cfgexpand
to move even though it only has one client.
build_addr may belong somewhere else, but Im not sure where... tree.c as
well maybe?  The fortran FE uses it as well...

A few #includes needed to be added to .c files for the moved prototypes.

I left the macro definitions for SCALE, LABEL and PERCENT at the bottom
of gimple.h.  I was going to move them, but really have no idea where to
put them. I thought about coretypes.h but that doesn't seem right
either.  suggestions?
I think PERCENT is only used by tree-into-ssa.c, so shove it in there.

SCALE and LABEL are only used by tree-cfg.c and tree-dfa.c, if that
helps you narrow down a potential location.
SCALE is also defined and used in ggc-common.c, ggc-page.c and
input.c... I'm still not sure where a *good* common place would be.
There is no need for those 3 places to redefine it.... (the defs are all
basically the same)
Ah, I'd filtered those others out because they had defintions in their .c files.

You could argue for system.h given it has MIN, MAX, CEIL (/me ducks).


Jeff


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