[PATCH] D71047: [LV] Keep dominator tree up to date during vectorization.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 13:57:24 PST 2019


fhahn added a comment.

IIUC ideally there should be no changes to the tests required to update the DT handling.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2679
 
+  // No trip count check needed for predicated vectorization.
+  if (Cost->foldTailByMasking())
----------------
This is also unrelated to preserving the DT and LI as we go along. Please strip from this patch.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2693
+  Value *CheckMinIters = Builder.CreateICmp(
+      P, Count, ConstantInt::get(Count->getType(), VF * UF), "min.iters.check");
+
----------------
Also unrelated to preserving the DT & LI?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2733
   // Create a new block containing the stride check.
+  auto OrigName = OrigPreHeader->getName().str();
   OrigPreHeader->setName("vector.scevcheck");
----------------
Unrelated?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2783
   // Create a new block containing the memory check.
+  auto OrigName = OrigPreHeader->getName().str();
   OrigPreHeader->setName("vector.memcheck");
----------------
unrelated?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2950
+  BasicBlock *OrigLoopPH = OrigLoop->getLoopPreheader();
+  if (OrigLoopPH->size() > 1)
+    LoopVectorPreHeader = SplitBlock(OrigLoopPH, OrigLoopPH->getTerminator(),
----------------
unrelated?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3121
+  assert(DT->verify(DominatorTree::VerificationLevel::Full));
+  LI->verify(*DT);
+
----------------
This needs wrapping in LLVM_DEBUG or using NDEBUG


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71047





More information about the llvm-commits mailing list