[PATCH] D18537: Don't vectorize loops when everything will be scalarized

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 14:36:17 PDT 2016


hfinkel added a comment.

In http://reviews.llvm.org/D18537#386214, @nadav wrote:

> I don't like the approach of passing in address-of-bool as parameter argument, especially since you did not document the parameter (is it IN, is it OUT, etc).
>
> Please change the getCost return value to return a struct, or std::pair that ties the cost and the bit that says if vectorization happened. Please declare a type for this pair:
>
> using VectorizationCostTy =  std::pair<unsigned, bool>;
>
> Then, update the Doxygen comments of the functions that use it.
>
> Also, the name "ActuallyVectorized" is not descriptive. Maybe "AnyInstructionVectorized" ?


Sure. Will do.


http://reviews.llvm.org/D18537





More information about the llvm-commits mailing list