[llvm] r191314 - set the cost of tiny trees to INT_MAX in SLP vectorizer to disable vectorization on them

Yi Jiang yi.jiang.llvm at gmail.com
Tue Sep 24 12:38:48 PDT 2013


Hi,

The test case is checked in @r191327. The original patch's commit log is 
not clear so I added some supplemental information. Basically we want to 
make sure that SLP vectorizer will not try to vectorize tiny trees even 
with a negative threshold so we set the cost to INT_MAX.

On 9/24/13 11:43 AM, Eric Christopher wrote:
> Cool deal. Thanks :)
>
> -eric
>
> On Tue, Sep 24, 2013 at 11:39 AM, Yi Jiang <yi.jiang.llvm at gmail.com> wrote:
>> Hi Eric and Chandler,
>>
>> I am working on reducing the test case and will send out soon.
>>
>> On 9/24/13 11:27 AM, Eric Christopher wrote:
>>> There was a bit here:
>>>
>>>
>>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130923/188773.html
>>>
>>> though a testcase probably wouldn't suck if there's a way to do it.
>>>
>>> -eric
>>>
>>> On Tue, Sep 24, 2013 at 10:35 AM, Chandler Carruth <chandlerc at google.com>
>>> wrote:
>>>> Test case? Justification? This seems somewhat arbitrary given the commit
>>>> log.
>>>>
>>>>
>>>> On Tue, Sep 24, 2013 at 12:26 PM, Yi Jiang <yjiang at apple.com> wrote:
>>>>> Author: yjiang
>>>>> Date: Tue Sep 24 12:26:43 2013
>>>>> New Revision: 191314
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=191314&view=rev
>>>>> Log:
>>>>> set the cost of tiny trees to INT_MAX in SLP vectorizer to disable
>>>>> vectorization on them
>>>>>
>>>>> Modified:
>>>>>       llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>>>>>
>>>>> Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>>>>> URL:
>>>>>
>>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=191314&r1=191313&r2=191314&view=diff
>>>>>
>>>>>
>>>>> ==============================================================================
>>>>> --- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
>>>>> +++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Tue Sep 24
>>>>> 12:26:43 2013
>>>>> @@ -947,7 +947,7 @@ int BoUpSLP::getTreeCost() {
>>>>>        if (!VectorizableTree.size()) {
>>>>>          assert(!ExternalUses.size() && "We should not have any external
>>>>> users");
>>>>>        }
>>>>> -    return 0;
>>>>> +    return INT_MAX;
>>>>>      }
>>>>>
>>>>>      unsigned BundleWidth = VectorizableTree[0].Scalars.size();
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>




More information about the llvm-commits mailing list