[PATCH] D153696: [LV] Only generate 1st part outside of vector region for VPInstruction.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 24 03:43:39 PDT 2023
fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: artagnon, StephenFan, rogfer01, zzheng, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.
Update VPInstruction::execute to only generate code for the first part
if the recipe is outside the vector loop region (i.e. the pre-headers
for now).
This avoids generating unnecessary code in the pre-headers (see adjusted
tests) and going forward allows using VPInstructions more generally for
code-generation outside the vector loop.
To facilitate this, VPTransformState::set/get() have been extended with
versions that take a std::variant with either the Part or a VPIteration.
When getting a the result for a definition outside the vector loop
region, always return Part 0. This means the callers do not need to
check where the definition resides.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153696
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll
llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-unroll.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153696.534188.patch
Type: text/x-patch
Size: 123946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230624/01436cd6/attachment-0001.bin>
More information about the llvm-commits
mailing list