[PATCH] D157713: [VPlan] Perform tail folding as VPlan transform. (WIP)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 07:03:02 PDT 2023
fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin, dmgreen.
Herald added subscribers: StephenFan, tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added subscribers: wangpc, vkmr.
Herald added a project: LLVM.
This patch splits off the tail-folding logic from general mask handling
to it's own transform, which
- introduces the required mask to the VPlan
- updates existing masks to be the AND of the existing mask and the mask for the header block,
- adds masks to recipes that require masks with tail-folding.
This moves tail folding to be part of the gradual lowering & refinement
of a VPlan. Moving tail-folding to a VPlan2VPlan transform makes it
independent of the underlying IR and allows it to be applied to generic
VPlans.
NOTE: there are a few remaining test failures due to slightly different
ordering of instructions computing the mask. I will fix them once we
converge on the review. I wanted to share this early.
Depends on D157037 <https://reviews.llvm.org/D157037>.
Depends on D157443 <https://reviews.llvm.org/D157443>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157713
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157713.549377.patch
Type: text/x-patch
Size: 20768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230811/31f9e686/attachment.bin>
More information about the llvm-commits
mailing list