[PATCH] D48591: [TargetLowering] isVectorClearMaskLegal - use ArrayRef<int> instead of const SmallVectorImpl<int>&

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 06:08:04 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D48591#1143450, @spatel wrote:

>


If it is modified, then `SmallVectorImpl` is needed, obviously.
Else
If not all users are passing something derived from `SmallVectorImpl`, then `ArrayRef` is better.
Else, if all users are derived from `SmallVectorImpl`, then it is best to pass that,
since it is just a downcast, while construction of `ArrayRef` is, well, construction.
Example: https://godbolt.org/g/zkYiC4


Repository:
  rL LLVM

https://reviews.llvm.org/D48591





More information about the llvm-commits mailing list