[PATCH] D65197: [LV] Tail-loop Folding

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 03:57:58 PDT 2019


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: Meinersbur, hsaito, fhahn, samparker, dmgreen, rengolin.
Herald added subscribers: rkruppe, hiraditya.
Herald added a project: LLVM.

This allows folding of the scalar epilogue loop (the tail) into the main
vectorised loop body when the loop is annotated with a "vector predicate"
metadata hint. To fold the tail, instructions need to be predicated (masked),
enabling/disabling lanes for the remainder iterations.

      

This depends on D64744 <https://reviews.llvm.org/D64744> that introduces the llvm.loop.vectorize.predicate.enable
pragma and metadata node, and D64916 <https://reviews.llvm.org/D64916> which is a refactoring to make tail
folding a more general concept.


https://reviews.llvm.org/D65197

Files:
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/lib/Analysis/LoopInfo.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/tail_loop_folding.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65197.211460.patch
Type: text/x-patch
Size: 11537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190724/235f5a4a/attachment.bin>


More information about the llvm-commits mailing list