This patch renames AffineParallelNormalize to AffineLoopNormalize to make it
more generic and be able to hold more loop normalization transformations in
the future for affine.for and affine.parallel ops. Eventually, it could also be
extended to support scf.for and scf.parallel. As a starting point for affine.for,
the patch also adds support for removing single iteration affine.for ops to the
the pass.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Affine/Transforms/AffineLoopNormalize.cpp | ||
---|---|---|
86 | This should only be defined in the mlir namespace if it was declared in it, which does not seem to be the case. For functions scoped in a translation unit, MLIR uses static instead of anonymous namespaces. |
mlir/lib/Dialect/Affine/Transforms/AffineLoopNormalize.cpp | ||
---|---|---|
84 | I'd prefer if this was part of the public interface so that I can use it in downstream projects. Shouldn't this then be in the mlir namespace? |
mlir/lib/Dialect/Affine/Transforms/AffineLoopNormalize.cpp | ||
---|---|---|
84 | I think if you want to use this as a utility you may probably want to invoke the promoteIfSingleIteration directly since it's the only thing this method is doing for now. If we make normalizeAffineFor public when it's actually not normalizing the loop bounds it's going to be a bit confusing for external users, I think. |
This needs to be defined in the mlir namespace (this was a bug I introduced originally).