[PATCH] D142885: [VPlan] Allow building a VPlan to may fail.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 09:15:17 PST 2023


Ayal added a comment.

Adding a couple of nits. The optional functionality added cannot yet be exercised (with a test)?



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h:352
   /// Build a VPlan using VPRecipes according to the information gather by
   /// Legal. This method is only used for the legacy inner loop vectorizer.
+  std::optional<VPlanPtr>
----------------
What can be said about Range.End if this returns empty handed? As explained above, Range.End is possibly decreased according to the relevant VF's if this returns a VPlanPtr.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7530
       buildVPlansWithVPRecipes(UserVF, UserVF);
       LLVM_DEBUG(printPlans(dbgs()));
+      if (!hasPlanWithVF(UserVF))
----------------
Worth printing/reporting something if no plan was built?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142885



More information about the llvm-commits mailing list