[PATCH] D69040: [TTI][LV] preferPredicateOverEpilogue
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 07:21:08 PDT 2019
SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: Ayal, hsaito, fhahn, samparker, efriedma, dorit.
Herald added subscribers: dmgreen, rkruppe, hiraditya, kristof.beyls.
Herald added a project: LLVM.
We currently have two ways to steer creating a predicated vector body over
creating a scalar epilogue. To force this, we have 1) a command line option and
2. a pragma available. This adds a third, a target hook to TargetTransformInfo
that can be queried whether predication is preferred or not, which allows the
vectoriser to make the decision (without forcing it).
I did the initial TTI plumbing for this, added usage of this new hook to the
vectoriser where this should be queried, and added the beginning of an ARM MVE
implementation. While this isn't complete yet, it currently behaves as a
non-functional change, it demonstrates the required function interfaces. I.e.,
for MVE, we would like the vectoriser to do tail-folding when we know we will
be generating a hardware-loop and these checks are implemented in the ARM specific
hook. I will follow-up on this soon, but that will be an entirely ARM specific patch.
https://reviews.llvm.org/D69040
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/ARM/tail-loop-folding.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69040.225218.patch
Type: text/x-patch
Size: 11763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191016/17c21fcb/attachment.bin>
More information about the llvm-commits
mailing list