[Mlir-commits] [mlir] [MLIR] Add missing MLIRDialectUtils dep to TilingInterface (PR #84544)

Thomas Preud'homme llvmlistbot at llvm.org
Wed Mar 20 03:46:12 PDT 2024


RoboTux wrote:

> This change is problematic because it introduces a dependency from `mlir/Interfaces` on a dialect. (`DialectUtils` depends on `ArithDialect`.) I'd like to understand why `TilingInterface` needs `DialectUtils`. Do you see a way to remove that dependency?

DialectUtils provide the IteratorType used in TilingInterface's getLoopIteratorTypes() return type(SmallVector<utils::IteratorType>).

On the other hand AFAIK the ArithDialect dependency is only because of this line:
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Utils/StaticValueUtils.cpp#L25

(it also need an extra include of mlir/IR/Builders.h in StaticValueUtils.h and a MLIRDialectUtilsIncGen dependency in MLIRDialectUtils library definition). Could that somehow be made conditional upon ArithDialect being linked transitively or maybe moved to another place?

https://github.com/llvm/llvm-project/pull/84544


More information about the Mlir-commits mailing list