[PATCH] D111125: [NFC][LoopVectorize] Remove setBestPlan in favour of getBestPlanFor

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 01:57:45 PDT 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, fhahn, kmclaughlin.
Herald added subscribers: bmahjour, rogfer01, bollu, hiraditya.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, vkmr.
Herald added a project: LLVM.

I have removed LoopVectorizationPlanner::setBestPlan, since this
function is quite aggressive because it deletes all other plans
except the one containing the <VF,UF> pair required. The code is
currently written to assume that all <VF,UF> pairs will live in the
same vplan. This is overly restrictive, since scalable VFs live in
different plans to fixed-width VFS. When we add support for
vectorising epilogue loops when the main loop uses scalable vectors
then we will the vplan for the main loop will be different to the
epilogue.

Instead I have added a new function called

  LoopVectorizationPlanner::getBestPlanFor

that returns the best vplan for the <VF,UF> pair requested and leaves
all the vplans untouched. We then pass this best vplan to

  LoopVectorizationPlanner::executePlan

This patch was spun off due to comments in D109432 <https://reviews.llvm.org/D109432>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111125

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111125.377115.patch
Type: text/x-patch
Size: 6138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211005/db8b12dc/attachment.bin>


More information about the llvm-commits mailing list