[MLIR] Refactor affine tilePerfectlyNestedLoops to drop validity check
authorUday Bondhugula <uday@polymagelabs.com>
Tue, 28 Mar 2023 15:23:57 +0000 (20:53 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Tue, 28 Mar 2023 16:23:39 +0000 (21:53 +0530)
commitc3613f3990098b0c9c5e1931eea51281cd479202
treeecee03f94ed8c4bdd412d91ccca10197a9d9360f
parentccdcfad0815296d8952438632d9abe6bc0a5258a
[MLIR] Refactor affine tilePerfectlyNestedLoops to drop validity check

The affine loop utility `tilePerfectlyNestedLoops` was checking for the
validity of tiling as well as performing the tiling. This is
inconsistent with how other similar utilities work. Move out the
analysis/check from the utility so that the latter only performs the
mechanics of IR manipulation.

This is NFC/pure move beyond the change in behavior of
tilePerfectlyNestedLoops.

Differential Revision: https://reviews.llvm.org/D147055
mlir/include/mlir/Dialect/Affine/LoopUtils.h
mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp