[llvm] r220345 - LTO: respect command-line options that disable vectorization.

JF Bastien jfb at google.com
Fri Oct 24 08:53:44 PDT 2014


Hi Alexey,

vectorize-loops and vectorize-slp are off by default (though now they can
be turned on/off with this patch). Adding Nadav, I'm not the right person
to decide whether they should be on by default or not.

JF

On Fri, Oct 24, 2014 at 5:27 AM, Alexey Volkov <avolkov.intel at gmail.com>
wrote:

> Hi JF,
>
> After your commit I saw a performance regression because of disabled Loop
> Vectorizer:
>  LV: Not vectorizing: No #pragma vectorize enable.
> It is really strange since I used -Ofast -flto clang's options to build an
> application.
> Before this change loop was successfully vectorized by Loop Vectorizer.
>
> Thanks, Alexey.
>
> 2014-10-22 3:18 GMT+04:00 JF Bastien <jfb at google.com>:
>
>> Author: jfb
>> Date: Tue Oct 21 18:18:21 2014
>> New Revision: 220345
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=220345&view=rev
>> Log:
>> LTO: respect command-line options that disable vectorization.
>>
>> Summary: Patches 202051 and 208013 added calls to LTO's PassManager which
>> unconditionally add LoopVectorizePass and SLPVectorizerPass instead of
>> following the logic in PassManagerBuilder::populateModulePassManager and
>> honoring the -vectorize-loops -run-slp-after-loop-vectorization flags.
>>
>> Reviewers: nadav, aschwaighofer, yijiang
>>
>> Subscribers: llvm-commits
>>
>> Differential Revision: http://reviews.llvm.org/D5884
>>
>> Modified:
>>     llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=220345&r1=220344&r2=220345&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Oct 21
>> 18:18:21 2014
>> @@ -440,10 +440,12 @@ void PassManagerBuilder::addLTOOptimizat
>>    // More loops are countable; try to optimize them.
>>    PM.add(createIndVarSimplifyPass());
>>    PM.add(createLoopDeletionPass());
>> -  PM.add(createLoopVectorizePass(true, true));
>> +  PM.add(createLoopVectorizePass(DisableUnrollLoops, LoopVectorize));
>>
>>    // More scalar chains could be vectorized due to more alias information
>> -  PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains.
>> +  if (RunSLPAfterLoopVectorization)
>> +    if (SLPVectorize)
>> +      PM.add(createSLPVectorizerPass()); // Vectorize parallel scalar
>> chains.
>>
>>    // After vectorization, assume intrinsics may tell us more about
>> pointer
>>    // alignments.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
>
> --
> Alexey Volkov
> Intel Corporation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141024/20230426/attachment.html>


More information about the llvm-commits mailing list