[PATCH] D142885: [VPlan] Allow building a VPlan to may fail.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 15:38:39 PST 2023
Ayal added inline comments.
================
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>
----------------
Ayal wrote:
> 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.
Range.End must be greater than Range.Start in order to make forward progress even if a VPlan cannot be built for Range.Start. Suffice to say that if a VPlan cannot be built for Range.Start then Range.End must be set such that a VPlan cannot be built for any VF between Range.Start (inclusive) and Range.End (exclusive), where Range.End must be greater than Range.Start?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7530
buildVPlansWithVPRecipes(UserVF, UserVF);
LLVM_DEBUG(printPlans(dbgs()));
+ if (!hasPlanWithVF(UserVF))
----------------
Ayal wrote:
> Worth printing/reporting something if no plan was built?
Above LLVM_DEBUG() probably prints nothing and no report is issued for ignoring UserVF if no plan was built?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7563
LLVM_DEBUG(printPlans(dbgs()));
if (!MaxFactors.hasVector())
----------------
ditto?
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