[Mlir-commits] [mlir] [mlir] add MlirOptMain config callback for context configuration (PR #68228)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed Oct 4 09:01:48 PDT 2023
ftynse wrote:
> Could you expand why this hooks are needed vs downstream folks just customizing the context as they need? (e.g., what is the alternative, should MlirOptMain be taking a context instead of or in addition to a dialect registry?)
It's simple: there is no access to context when you run `MlirOptMain` otherwise. New context is created for each of the buffers when splitting the inputs and since context is non-copyable, one cannot just pass a context to `MlirOptMain`.
https://github.com/llvm/llvm-project/pull/68228
More information about the Mlir-commits
mailing list