[PATCH] D83824: [NFC] [LV] Vectorized Loop Skeleton Refactoring

Jeeva P. via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 14:25:25 PDT 2020


pjeeva01 added a comment.

This refactoring looks reasonable to me. I've left some comments inline.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:662
+  /// vector loop preheader, middle block and scalar preheader. Also
+  /// allocate a loop object for the new vector loop and returns it.
+  Loop *createVectorLoopSkeleton(StringRef Prefix);
----------------
nit: return it.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:665
+
+  /// Create new phi nodes for the induction variables to resume counting in the
+  /// scalar epilogue, from where the vectorized loop left off (given by \p
----------------
Perhaps the comment could be updated for clarity as:
.. to resume loop trip count from where the vectorized loop left off ..


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:671
+  /// Complete the loop skeleton by adding debug MDs, creating appropriate
+  /// conditional branchs in the middle block, preparing the builder and running
+  /// the verifier. Take in the vector loop \p L as argument, and return the
----------------
s/branchs/branches


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3048
+BasicBlock *InnerLoopVectorizer::completeLoopSkeleton(Loop *L,
+                                                      MDNode *OrigLoopID) {
+  assert(L && "Expected valid loop.");
----------------
Should we assert if OrigLoopID is null?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83824





More information about the llvm-commits mailing list