[PATCH] D96025: [LoopVectorize] Return both fixed and scalable Max VF from computeMaxVF.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 05:38:03 PST 2021


sdesmalen created this revision.
Herald added subscribers: bmahjour, rogfer01, bollu, hiraditya.
sdesmalen requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

This patch introduces a new class, `OptionalVFCandidates`, that holds
the possible maximum vectorization factors that have been computed. The
algorithm guarantees there is always at least one maximum VF (in worst
case ElementCount::getFixed(1) for scalarization), but may have both a
fixed MaxVF and a scalable MaxVF.

This patch is intended to be a non-functional change for now,
because LoopVectorizationPlanner::plan doesn't actually use the
scalable MaxVF yet to automatically pick a scalable VPlan
(at least not beyond the UserVF if that's given).

This patch is a preparatory patch with the ultimate goal of making
`computeMaxVF()` return both a max fixed VF and a max scalable VF,
so that `selectVectorizationFactor()` can pick the most cost-effective
vectorization factor.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96025

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96025.321396.patch
Type: text/x-patch
Size: 11872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210204/134c085b/attachment.bin>


More information about the llvm-commits mailing list