[llvm] r184827 - Fix a typo in the code that collected the costs recursively.
Nadav Rotem
nrotem at apple.com
Mon Jun 24 22:46:06 PDT 2013
On Jun 24, 2013, at 10:40 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Mon, Jun 24, 2013 at 10:30 PM, Nadav Rotem <nrotem at apple.com> wrote:
>> Author: nadav
>> Date: Tue Jun 25 00:30:56 2013
>> New Revision: 184827
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=184827&view=rev
>> Log:
>> Fix a typo in the code that collected the costs recursively.
>
> Any test case for this?
It is difficult to come up with a test because it slightly changed the estimated cost of expressions.
> (Hmm, I wonder if there's any way we could warn on something like this
> - a combination of typo correction ("hey, you've got a similarly named
> variable...") & a somewhat strange way of writing *= 2? I suppose
> that's not really a strong enough signal)
I think that the static analyzer gives a warning for this kind of an error.
>>
>>
>> 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=184827&r1=184826&r2=184827&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Tue Jun 25 00:30:56 2013
>> @@ -727,7 +727,7 @@ int FuncSLP::getTreeCost_rec(ArrayRef<Va
>> int Cost = getTreeCost_rec(Operands, Depth + 1);
>> if (Cost == MAX_COST)
>> return MAX_COST;
>> - TotalCost += TotalCost;
>> + TotalCost += Cost;
>> }
>>
>> // Calculate the cost of this instruction.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130624/59faac15/attachment.html>
More information about the llvm-commits
mailing list