[PATCH] D89566: [LV] Epilogue Vectorization with Optimal Control Flow

Vinay Madhusudan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 09:00:12 PDT 2020


mivnay added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:175
+
+static cl::opt<bool> EnableEpilogueVectorization(
+    "enable-epilogue-vectorization", cl::init(false), cl::Hidden,
----------------
Why not enable it by default?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:907
+  ElementCount EpilogueVF = ElementCount::getFixed(0);
+  unsigned EpilogueUF = 0;
+  BasicBlock *MainLoopIterationCountCheck = nullptr;
----------------
High UF might negate the benefit of EpilogVectorization. I think keeping `UF = 1` is a good idea unless there are multiple levels of epilog loop vectorization.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7320
+template <typename ILVType>
+void LoopVectorizationPlanner::executePlanForEpilogueVectorization(
+    ILVType &ILV, DominatorTree *DT) {
----------------
This function and other core functions like `createEpilogueVectorizedLoopSkeleton`, `createInductionResumeValues`, etc contains lot of redundant code. Can it be improved?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89566



More information about the llvm-commits mailing list