[Mlir-commits] [mlir] [mlir] load dialects for non-namespaced attrs (PR #94838)

Jeremy Kun llvmlistbot at llvm.org
Tue Jun 18 16:11:22 PDT 2024


j2kun wrote:

> MLIRTranslateMain does not, but the callback should (that is the translate function you're registering)

I don't think the `DialectRegistrationFunction` has the context, and by the time you get to the `TranslateFromMLIRFunction`, the parsing has already happened.

Cf. https://github.com/llvm/llvm-project/blob/f0a76d5cb53dda912565ab9d1d6807c569e4c636/mlir/lib/Tools/mlir-translate/Translation.cpp#L135-L154

Unless you mean I should be calling `registerTranslation` with all that boilerplate repeated?

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


More information about the Mlir-commits mailing list