[all-commits] [llvm/llvm-project] 3a41ff: [mlir][SCF] Peel scf.for loops for even step divison
Matthias Springer via All-commits
all-commits at lists.llvm.org
Mon Aug 2 18:34:30 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3a41ff4883fe8b9e34a4f30aa9eecaf2ecb2ef44
https://github.com/llvm/llvm-project/commit/3a41ff4883fe8b9e34a4f30aa9eecaf2ecb2ef44
Author: Matthias Springer <springerm at google.com>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M mlir/include/mlir/Dialect/SCF/Passes.h
M mlir/include/mlir/Dialect/SCF/Passes.td
M mlir/include/mlir/Dialect/SCF/Transforms.h
M mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
A mlir/test/Dialect/SCF/for-loop-peeling.mlir
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Log Message:
-----------
[mlir][SCF] Peel scf.for loops for even step divison
Add ForLoopBoundSpecialization pass, which specializes scf.for loops into a "main loop" where `step` divides the iteration space evenly and into an scf.if that handles the last iteration.
This transformation is useful for vectorization and loop tiling. E.g., when vectorizing loads/stores, programs will spend most of their time in the main loop, in which only unmasked loads/stores are used. Only the in the last iteration (scf.if), slower masked loads/stores are used.
Subsequent commits will apply this transformation in the SparseDialect and in Linalg's loop tiling.
Differential Revision: https://reviews.llvm.org/D105804
More information about the All-commits
mailing list