[Mlir-commits] [mlir] [mlir] add MlirOptMain config callback for context configuration (PR #68228)

Stella Laurenzo llvmlistbot at llvm.org
Wed Oct 4 09:18:14 PDT 2023


================
@@ -176,6 +189,10 @@ class MlirOptMainConfig {
   /// general.
   bool allowUnregisteredDialectsFlag = false;
 
+  /// The callback for additional configuration of the MLIR context after it has
+  /// been created and populated from the registry.
+  std::function<LogicalResult(MLIRContext &)> contextConfigurationCallback;
+
----------------
stellaraccident wrote:

Fwiw, I've been owning these tools downstream for years and have been on the verge of forking away from optmain many times because it is too brittle. I think we were wrong on being so restrictive on it, and that is a pretty strong opinion based on experience at this point. 

But I'm not going to spend the energy to argue it very much in the abstract: it's just a utility/sample code and I'll probably fork it some day if needs don't match upstream expectations.

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


More information about the Mlir-commits mailing list