>-----Original Message----- >From: Richard Henderson [mailto:r...@redhat.com] >Sent: Monday, September 10, 2012 12:03 PM >To: Iyer, Balaji V >Cc: Richard Guenther; gcc-patches@gcc.gnu.org; Gabriel Dos Reis; Aldy >Hernandez (al...@redhat.com); Jeff Law >Subject: Re: [PATCH] Merging Cilk Plus into Trunk (Patch 1 of approximately 22) > >On 09/07/2012 12:31 PM, Iyer, Balaji V wrote: >> I hope I have not mistaken your question, but to clarify the elemental >> function's definition and body is visible to all passes after the >> invocation of gimplify_function_tree (). It is also visible for the >> LTO optimization. > >If that's the case, what's the point in defining an external ABI and defining >what >__attribute__((vector)) placed on a function declaration means?
When you have __attribute__((vector)) you are asking the compiler to create a vector AND a scalar version of the function. The advantage is that if the function is used, for example, in 2 loops where 1 can be vectorized and another cannot, the vectorizable loop won't suffer (i.e. suffer from being not-vectorized). Thanks, Balaji V. Iyer. > > >r~