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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 06:37:57 PDT 2019


fhahn added a reviewer: fhahn.
fhahn added a comment.

I like the direction of this! Some comments inline. Also, would it be possible to add a test, checking for the expected messages?



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


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1435
       V.push_back(&L);
+      LLVM_DEBUG(dbgs() << "LV: The loop '"
+                        << L.getName()
----------------
Not sure how helpful this message is. Won't the LV debug output mention the loops it is working on?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7586
+  for (auto &L : *LI) {
+    bool Simplified =
         simplifyLoop(L, DT, LI, SE, AC, nullptr, false /* PreserveLCSSA */);
----------------
Not sure how helpful this information on its own is. 


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