This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting tm.h macros to functions
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: Converting tm.h macros to functions
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Tue, 19 Jun 2001 07:17:24 +0100
- Cc: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, gcc at gcc dot gnu dot org
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.