[PATCH] D83646: [LV][LoopUtils] Add UseReductionIntrinsic to createTargetReduction

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 12 13:39:09 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: gilr, Ayal, fhahn, SjoerdMeijer.
Herald added subscribers: vkmr, rogfer01, hiraditya.
Herald added a project: LLVM.

This changes the interface to createTargetReduction and createSimpleTargetReduction to take a UseReductionIntrinsic bool, instead of asking TTI. This allows us to calculate UseReductionIntrinsic earlier in the vectorizer and reduce the need to propagate TTI into RecuctionRecipes.

In the process I added a getReductionFlags mathod for conveniently creating the TargetTransformInfo::ReductionFlags flags used by several methods.


https://reviews.llvm.org/D83646

Files:
  llvm/include/llvm/Analysis/IVDescriptors.h
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83646.277302.patch
Type: text/x-patch
Size: 14603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200712/13edb22d/attachment.bin>


More information about the llvm-commits mailing list