>-----Original Message----- >From: Jakub Jelinek [mailto:ja...@redhat.com] >Sent: Friday, September 07, 2012 4:07 PM >To: Andi Kleen >Cc: Iyer, Balaji V; Richard Guenther; gcc-patches@gcc.gnu.org; Gabriel Dos >Reis; >Aldy Hernandez (al...@redhat.com); Jeff Law; r...@redhat.com >Subject: Re: [PATCH] Merging Cilk Plus into Trunk (Patch 1 of approximately 22) > >On Fri, Sep 07, 2012 at 12:59:26PM -0700, Andi Kleen wrote: >> "Iyer, Balaji V" <balaji.v.i...@intel.com> writes: >> > >> > Yes, I really like this idea and that is kind of what I want. But, how do >> > I turn on >vectorization on a function by function basis? I tried to set >flag_tree_vectorize=1 >but that doesn't seem to do the trick. >> >> AFAIK vectorization needs a range of passes to work, so it probably >> needs full >> -O3 or something similar like you did. Apparently the optimize >> attribute has some known problems, but I don't know if it would affect this >case. > >Nope, -O2 -ftree-vectorize works just fine. Vectorization only needs if- >conversion, but that is enabled by default if -ftree-vectorize (unless >explicitly >disabled).
So, if I am understanding this correctly, there is no way to have the vectorization turned on/off on a function by function basis? I don't mind if it is turned off for -O0, but would like it be turned on/off for anything > -O1. > > Jakub