This is the mail archive of the 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: Factor unrelated declarations out of tree.h (2/2)

On Thu, 14 Nov 2013, Diego Novillo wrote:

> These are due to builtins.h.  The structs defined in there need
> FIRST_PSEUDO_REGISTER.  This means that we have parts of builtins.h
> that are OK for FEs and others that aren't.  This is not good.
> The best alternative for this change is to leave the declarations for
> builtins.h inside tree.h and then decide what to do about builtins.h
> itself. We clearly need it to declare everything related to builtins,
> but from what you're stating about tm.h, we will need to have an FE
> variant and an ME/BE variant?

I imagine that FIRST_PSEUDO_REGISTER will be one of the harder parts of 
the back-end interface to move away from macros, so, yes, it will need 
splitting (and GIMPLE optimizers, as well as front ends, should avoid tm.h 
where possible - target macros they use are generally among the more 
straightforward to convert to hooks - it's only the RTL parts of the 
compiler where we're a long way from being able to eliminate tm.h).

So, put all the new prototypes in a new tree-builtins.h (for example).  
Everything in the existing header needs tm.h (SWITCHABLE_TARGET also needs 
tm.h - most flags.h users manage to get away without it because they don't 
use those bits of flags.h, but really users of flags.h should move to 
options.h and other headers as needed).

Joseph S. Myers

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