diff mbox

[DOC] Enhance target_clones documentation (PR other/78366).

Message ID 5a01df88-a425-ed52-fae0-3850201174d5@suse.cz
State New
Headers show

Commit Message

Martin Liška June 22, 2017, 12:42 p.m. UTC
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  <mliska@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(-)

Comments

Martin Liška June 30, 2017, 1:55 p.m. UTC | #1
PING^1

On 06/22/2017 02:42 PM, Martin Liška wrote:
> 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  <mliska@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(-)
> 
>
Jeff Law June 30, 2017, 3:16 p.m. UTC | #2
On 06/30/2017 07:55 AM, Martin Liška wrote:
> PING^1
> 
> On 06/22/2017 02:42 PM, Martin Liška wrote:
>> 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  <mliska@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(-)
>>
>>
> 
OK.

jeff
diff mbox

Patch

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