[PATCH] Minor optimization: Turn a large macro into a function

Andi Kleen ak@suse.de
Fri Feb 2 18:10:00 GMT 2007


On Friday 02 February 2007 18:59, Ian Lance Taylor wrote:
> Andi Kleen <ak@suse.de> writes:
> 
> > 2007-02-02  Andi Kleen  <ak@suse.de>
> > 
> > 	* varasm.c (asm_output_ascii): Add.
> > 	* output.h (asm_output_ascii): Declare.
> > 	* varasm.c, dwarf2asm.c: Call asm_output_ascii.
> 
> The right thing to do is to make this a target hook,
> targetm.asm_out.ascii.  Let's do that instead.  You can just have the
> default function call ASM_OUTPUT_ASCII for now, and we can fix the
> backends at our leisure.

What advantages would that have over the simple call? Do you expect
this to change at runtime? 

-Andi



More information about the Gcc-patches mailing list