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

Mehdi Amini llvmlistbot at llvm.org
Wed Oct 4 09:12:35 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;
+
----------------
joker-eph wrote:

This isn't the first time his came up, and we've always heavily pushed back on adding unconstrained MLIRContext access here.

I need to review this more carefully.

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


More information about the Mlir-commits mailing list