Conditional compilation

Ian Lance Taylor iant@google.com
Tue May 10 14:34:00 GMT 2011


Stéphane FORNENGO <sfornengo@gmail.com> writes:

> Is the following idea possible ?
> take for example the strcmp function with the standard following code:

...

> this usages could be detect at compile time and the function code
> greatly optimized knowing this information !

Yes, this is possible, and the x86 backend already uses this
information, when available, when selecting the strcmp strategy.  This
kind of optimization is inherently machine dependent; I'm not sure
whether any other backends implement it.

Ian



More information about the Gcc-help mailing list