[PATCH] D57059: [SLP] Initial support for the vectorization of the non-power-of-2 vectors.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 06:26:08 PDT 2020


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7432
+    for (unsigned I = 0, E = ExtraArgs.size(); I < E; ++I, ++It) {
+      Args[I] = It->second;
+    }
----------------
spatel wrote:
> Is it necessary to copy these? If so, it would be better to name this function something like "getCopyOfExtraArgValues" to make that explicit.
> 
> If not, we can just make this a standard 'get' method:
>   const MapVector<Instruction *, Value *> &getExtraArgs() const {
>     return ExtraArgs;
>   }
> 
> And then access the 'second' data in the user code?
We don't need to expose the `first` element of the `MapVector` here, it is not good from the general design point of view. I'll rename the member function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57059/new/

https://reviews.llvm.org/D57059



More information about the llvm-commits mailing list