Hi. As mentioned in the PR, we only generate a resolver function when there's a usage of a function with target_clones attribute. Let's document the behavior.
Ready to be installed? Martin gcc/ChangeLog: 2017-06-22 Martin Liska <mli...@suse.cz> PR other/78366 * doc/extend.texi: Document when a resolver function is generated for target_clones. --- gcc/doc/extend.texi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 43f9ecf2466..24a9672fc2e 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3278,16 +3278,16 @@ are the same as for @code{target} attribute. For instance, on an x86, you could compile a function with @code{target_clones("sse4.1,avx")}. GCC creates two function clones, one compiled with @option{-msse4.1} and another with @option{-mavx}. -It also creates a resolver function (see the @code{ifunc} attribute -above) that dynamically selects a clone suitable for current -architecture. On a PowerPC, you can compile a function with @code{target_clones("cpu=power9,default")}. GCC will create two function clones, one compiled with @option{-mcpu=power9} and another -with the default options. It also creates a resolver function (see +with the default options. + +It also creates a resolver function (see the @code{ifunc} attribute above) that dynamically selects a clone -suitable for current architecture. +suitable for current architecture. The resolver is created only if there +is a usage of a function with @code{target_clones} attribute. @item unused @cindex @code{unused} function attribute