[PATCH] D26277: [SLP] Fixed cost model for horizontal reduction.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 21:39:31 PST 2016


No, it is not quite so. The original rationale was to fix cost estimation for the scalar operations (VectorType was used rather than ScalarType for the cost estimation of the scalar operations). But also I tried to tweak the model somehow to get more correct cost estimation of the vector and scalar operations. But I did not take into account the cost of BoUpSLP tree, which is part of this estimation. I will look at the cost of the tree and also will try to improve it, because now I think this cost is the reason of too optimistic cost of vectorized code. 

Best regards,
Alexey Bataev

> 19 нояб. 2016 г., в 2:35, Michael Kuperstein via llvm-commits <llvm-commits at lists.llvm.org> написал(а):
> 
> mkuper added a comment.
> 
> In https://reviews.llvm.org/D26277#599995, @ABataev wrote:
> 
>> In https://reviews.llvm.org/D26277#598814, @mkuper wrote:
>> 
>>> So, now, none of the costs on the tests actually change?
>>> Does that mean that the changes in costs in the previous versions came from the +1?
>>> 
>>> Can you add a test that demonstrates the cost change? (Preferably in a way that shows what happened - e.g. commit a test with the "bad" cost, and then have a diff with the good one).
>> 
>> 
>> Changed a code a little bit. Checked it, the calculated cost is very close to the real situation, but seems to me the BoUpSLP tree cost is too optimistic. Will look at it later.
> 
> 
> I'm sorry, but I'm still confused.
> The original rationale for this patch was that the vector cost model is too optimistic, but the only test change seems to show the cost model becoming  even more optimistic.
> 
> 
> https://reviews.llvm.org/D26277
> 
> 
> 
> 


More information about the llvm-commits mailing list