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

Re: Converting tm.h macros to functions


Stan Shebs wrote:-

> This would be really great.  My one tiny worry is that the function
> calls will add tiny bit of overhead to an already-slow compiler.

I should point out that doing this work can actually reduce the number
of function calls made.  I'm currently replacing
merge_machine_decl_attributes(), which is a function that, through
conditional compilation, calls a target-specific routine.

So we have

  random_function()-->merge_machine_decl_attributes()-->target_mmda()

With the new scheme we nuke merge_machine_decl_attributes, and just
call the target one directly.  Also, there is no conditional
compilation at all, instead an indirection through a function pointer:

  random_function()-->target_mmda().
 
Neil.


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