Re: [RFC, patch] New attribute to create target clones

2015-08-21 Thread Jeff Law
On 08/20/2015 05:38 PM, Evgeny Stupachenko wrote: On Mon, Aug 3, 2015 at 9:43 PM, Jeff Law wrote: On 07/30/2015 04:19 PM, Evgeny Stupachenko wrote: Hi All, The patch enables new attribute 'ctarget', The attribute force compiler to create clones of a function with the attribute. For example:

Re: [RFC, patch] New attribute to create target clones

2015-08-20 Thread Evgeny Stupachenko
On Mon, Aug 3, 2015 at 9:43 PM, Jeff Law wrote: > On 07/30/2015 04:19 PM, Evgeny Stupachenko wrote: >> >> Hi All, >> >> The patch enables new attribute 'ctarget', >> The attribute force compiler to create clones of a function with the >> attribute. >> >> For example: >> __attribute__((ctarget("avx

Re: [RFC, patch] New attribute to create target clones

2015-08-03 Thread Jeff Law
On 07/30/2015 04:19 PM, Evgeny Stupachenko wrote: Hi All, The patch enables new attribute 'ctarget', The attribute force compiler to create clones of a function with the attribute. For example: __attribute__((ctarget("avx","arch=slm","arch=core-avx2","default"))) So presumably we're allowing bo

Re: [RFC, patch] New attribute to create target clones

2015-07-31 Thread Jeff Law
On 07/31/2015 05:50 AM, Evgeny wrote: New ctarget attribute automatically clone function and optimize for corresponding target. For target attribute if you specify "avx,sse4" you will get only 1 function optimized for the target with higher priority, while ctarget will generate 2 functions: one o

Re: [RFC, patch] New attribute to create target clones

2015-07-30 Thread Jeff Law
On 07/30/2015 04:19 PM, Evgeny Stupachenko wrote: Hi All, The patch enables new attribute 'ctarget', The attribute force compiler to create clones of a function with the attribute. For example: __attribute__((ctarget("avx","arch=slm","arch=core-avx2","default"))) int foo () will create 3 clone

Re: [RFC, patch] New attribute to create target clones

2015-07-30 Thread Joseph Myers
On Fri, 31 Jul 2015, Evgeny Stupachenko wrote: > The patch enables new attribute 'ctarget', Attributes should be documented in extend.texi. -- Joseph S. Myers jos...@codesourcery.com

Re: [RFC, patch] New attribute to create target clones

2015-07-30 Thread Evgeny Stupachenko
You can't apply both 'ctarget' and 'target' attributes to a function. The patch uses same target specific methods to create dispatcher and target clones. On Fri, Jul 31, 2015 at 1:30 AM, Andrew Pinski wrote: > On Thu, Jul 30, 2015 at 3:19 PM, Evgeny Stupachenko > wrote: >> Hi All, >> >> The pat

Re: [RFC, patch] New attribute to create target clones

2015-07-30 Thread Andrew Pinski
On Thu, Jul 30, 2015 at 3:19 PM, Evgeny Stupachenko wrote: > Hi All, > > The patch enables new attribute 'ctarget', > The attribute force compiler to create clones of a function with the > attribute. > > For example: > __attribute__((ctarget("avx","arch=slm","arch=core-avx2","default"))) > int >

Re: [RFC, patch] New attribute to create target clones

2015-07-30 Thread Evgeny Stupachenko
Forget C++ tests. On Fri, Jul 31, 2015 at 1:19 AM, Evgeny Stupachenko wrote: > Hi All, > > The patch enables new attribute 'ctarget', > The attribute force compiler to create clones of a function with the > attribute. > > For example: > __attribute__((ctarget("avx","arch=slm","arch=core-avx2","d

[RFC, patch] New attribute to create target clones

2015-07-30 Thread Evgeny Stupachenko
Hi All, The patch enables new attribute 'ctarget', The attribute force compiler to create clones of a function with the attribute. For example: __attribute__((ctarget("avx","arch=slm","arch=core-avx2","default"))) int foo () will create 3 clones of foo() optimized for corresponding targets and r