aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorSergei Grechanik <sergei.grechanik@intel.com>2021-05-05 08:33:19 -0700
committerSergei Grechanik <sergei.grechanik@intel.com>2021-05-05 09:03:59 -0700
commitd80b04ab0015b218b613f8fe59506d45739817b8 (patch)
tree25864121fee38c998cc3a9f4931dc345245bd1f9 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent20d0aca43073f18f70b1c5a665631dee1be1598d (diff)
downloadllvm-d80b04ab0015b218b613f8fe59506d45739817b8.zip
llvm-d80b04ab0015b218b613f8fe59506d45739817b8.tar.gz
llvm-d80b04ab0015b218b613f8fe59506d45739817b8.tar.bz2
[mlir][Affine][Vector] Support vectorizing reduction loops
This patch adds support for vectorizing loops with 'iter_args' implementing known reductions along the vector dimension. Comparing to the non-vector-dimension case, two additional things are done during vectorization of such loops: - The resulting vector returned from the loop is reduced to a scalar using `vector.reduce`. - In some cases a mask is applied to the vector yielded at the end of the loop to prevent garbage values from being written to the accumulator. Vectorization of reduction loops is disabled by default. To enable it, a map from loops to array of reduction descriptors should be explicitly passed to `vectorizeAffineLoops`, or `vectorize-reductions=true` should be passed to the SuperVectorize pass. Current limitations: - Loops with a non-unit step size are not supported. - n-D vectorization with n > 1 is not supported. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D100694
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions