[all-commits] [llvm/llvm-project] 3d706c: [NFC][LoopVectorize] Remove setBestPlan in favour ...
david-arm via All-commits
all-commits at lists.llvm.org
Wed Oct 27 01:38:46 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d706c20f8e69795835d68b7a5ac63966027f1c1
https://github.com/llvm/llvm-project/commit/3d706c20f8e69795835d68b7a5ac63966027f1c1
Author: David Sherwood <david.sherwood at arm.com>
Date: 2021-10-27 (Wed, 27 Oct 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll
Log Message:
-----------
[NFC][LoopVectorize] Remove setBestPlan in favour of getBestPlanFor
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
which now takes an additional VPlanPtr argument.
Differential revision: https://reviews.llvm.org/D111125
More information about the All-commits
mailing list