[PATCH] D62311: [LV] Inform about exactly reason of loop illegality

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 06:59:26 PDT 2019


psamolysov marked 2 inline comments as done.
psamolysov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:602
             !PhiTy->isPointerTy()) {
+          LLVM_DEBUG(dbgs()
+                 << "LV: Not vectorizing: Found an unsupported type of PHI.\n");
----------------
fhahn wrote:
> Please unify this debug message with the one at line 606. Having both seems redundant.
Thank you very much! The second message is removed.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1435
       V.push_back(&L);
+      LLVM_DEBUG(dbgs() << "LV: The loop '"
+                        << L.getName()
----------------
fhahn wrote:
> Not sure how helpful this message is. Won't the LV debug output mention the loops it is working on?
Not all loops (for example, outer loops) can be selected as supported and I think it could be helpful (as least for persons not familiar deeply with the vectorization mechanism) to know which loops are selected to be checked on legality and vectorized and which are not.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7586
+  for (auto &L : *LI) {
+    bool Simplified =
         simplifyLoop(L, DT, LI, SE, AC, nullptr, false /* PreserveLCSSA */);
----------------
fhahn wrote:
> Not sure how helpful this information on its own is. 
I agree, it could be not important which loops were simplified, but simplification can change the CFG and it could be not obvious why the pass is processing not the same IR as it might be expected. But if you or any other reviewers don't need this message, I'll remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62311





More information about the llvm-commits mailing list