[PATCH] D75240: Add a pass that specializes parallel loops for easier unrolling and vectorization

Benjamin Kramer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 04:34:05 PST 2020


bkramer created this revision.
bkramer added a reviewer: herhut.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.

This matches loops with a affine.min upper bound, limiting the trip
count to a constant, and rewrites them into two loops, one with constant
upper bound and one with variable upper bound. The assumption is that
the constant upper bound loop will be unrolled and vectorized, which is
preferable if this is the hot path.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75240

Files:
  mlir/include/mlir/Dialect/LoopOps/Passes.h
  mlir/include/mlir/InitAllPasses.h
  mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
  mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopPreparationForVectorization.cpp
  mlir/test/Dialect/Loops/parallel-loop-preparation-for-vectorization.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75240.246912.patch
Type: text/x-patch
Size: 7334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200227/5da34d66/attachment-0001.bin>


More information about the llvm-commits mailing list