public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][DOC] Enhance target_clones documentation (PR other/78366).
@ 2017-06-22 12:42 Martin Liška
  2017-06-30 13:55 ` Martin Liška
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2017-06-22 12:42 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

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(-)



[-- Attachment #2: 0001-Enhance-target_clones-documentation-PR-other-78366.patch --]
[-- Type: text/x-patch, Size: 1187 bytes --]

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][DOC] Enhance target_clones documentation (PR other/78366).
  2017-06-22 12:42 [PATCH][DOC] Enhance target_clones documentation (PR other/78366) Martin Liška
@ 2017-06-30 13:55 ` Martin Liška
  2017-06-30 15:16   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2017-06-30 13:55 UTC (permalink / raw)
  To: gcc-patches

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(-)
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][DOC] Enhance target_clones documentation (PR other/78366).
  2017-06-30 13:55 ` Martin Liška
@ 2017-06-30 15:16   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2017-06-30 15:16 UTC (permalink / raw)
  To: Martin Liška, gcc-patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-30 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22 12:42 [PATCH][DOC] Enhance target_clones documentation (PR other/78366) Martin Liška
2017-06-30 13:55 ` Martin Liška
2017-06-30 15:16   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).