[Mlir-commits] [mlir] [mlir][NFC] Split registerAndParseCLIOptions() in mlir-opt (PR #166538)
Andrei Golubev
llvmlistbot at llvm.org
Thu Nov 6 00:12:40 PST 2025
andrey-golubev wrote:
> I'm not against this, but wonder: can't you register your option before calling this function?
It's complicated: we actually do have to "pre parse" the CLI in order to add extra options. E.g. we have different passes depending on HW target, and in order to know which passes to register we need to parse only some options, then register more, then parse fully (this is a mess to be honest).
>From MLIR's perspective, seems like it's enough to just separate "native" registration from parsing, since we can intervene in the middle whilst not having to reimplement the complete `MlirOptMain`.
https://github.com/llvm/llvm-project/pull/166538
More information about the Mlir-commits
mailing list