[Mlir-commits] [mlir] [mlir][transform] Fix new interpreter and library preloading passes. (PR #69190)

Ingo Müller llvmlistbot at llvm.org
Tue Oct 17 01:12:28 PDT 2023


ingomueller-net wrote:

Thanks for the review. Nits addressed in latest commit.

> Could you elaborate why the dialect dependency is necessary for these passes? It is usually required when the pass creates entities from the dialect, are these passes creating something?

Sure:
* The preload pass calls [`MLIRContext::getOrLoadDialect<transform::TransformDialect>`](
https://github.com/llvm/llvm-project/blob/1bf08709/mlir/lib/Dialect/Transform/Transforms/PreloadLibraryPass.cpp#L35C22-L35C69).
* The interpreter pass [calls `transform::detail::getPreloadedTransformModule`](https://github.com/llvm/llvm-project/blob/4606712ef5b422edbe3799b665dcad7dcf348b90/mlir/lib/Dialect/Transform/Transforms/InterpreterPass.cpp#L30), which [does the same](https://github.com/llvm/llvm-project/blob/1bf08709/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp#L115C16-L115C63).

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


More information about the Mlir-commits mailing list