[MLIR] Fix affine.for unroll for multi-result upper bound maps
authorUday Bondhugula <uday@polymagelabs.com>
Sat, 4 Dec 2021 01:49:16 +0000 (07:19 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Sat, 4 Dec 2021 01:50:26 +0000 (07:20 +0530)
commit2108ed0671c0581efed8de929c862dbbc3e31c24
tree071b4de7e47662a5230acd33227d599ba9a49edb
parent9e42f2aa0b832c22377c993d64eb42aec65aa931
[MLIR] Fix affine.for unroll for multi-result upper bound maps

Fix affine.for unroll for multi-result upper bound maps: these can't be
unrolled/unroll-and-jammed in cases where the trip count isn't known to
be a multiple of the unroll factor.

Fix and clean up repeated/unnecessary checks/comments at helper callees.

Also, fix clang-tidy variable naming warnings and redundant includes.

Differential Revision: https://reviews.llvm.org/D114662
mlir/lib/Transforms/Utils/LoopUtils.cpp
mlir/test/Dialect/Affine/unroll-jam.mlir
mlir/test/Dialect/Affine/unroll.mlir