G++ 4.8 function multi versioning
bearophile
bearophileHUGS at lycos.com
Mon Mar 11 09:20:09 PDT 2013
An interesting feature of G++ 4.8:
http://gcc.gnu.org/wiki/FunctionMultiVersioning
It allows to write various versions of a function, for different
CPUs.
To work it uses new built-in functions like
__builtin_cpu_supports and __builtin_cpu_is, run-time dispatch,
the attribute syntax, plus the syntax to specify target
optimizations for each function:
http://gcc.gnu.org/wiki/FunctionSpecificOpt
Bye,
bearophile
More information about the Digitalmars-d
mailing list