[Mlir-commits] [mlir] [MLIR][Transform] Allow stateInitializer and stateExporter for applyTransforms (PR #101186)

Amy Wang llvmlistbot at llvm.org
Mon Sep 9 09:38:42 PDT 2024


================
@@ -131,11 +131,13 @@ class TransformOptions {
 /// will be executed following the internal logic of the operation. It must
 /// have the `PossibleTopLevelTransformOp` trait and not have any operands.
 /// This function internally keeps track of the transformation state.
-LogicalResult
-applyTransforms(Operation *payloadRoot, TransformOpInterface transform,
-                const RaggedArray<MappedValue> &extraMapping = {},
-                const TransformOptions &options = TransformOptions(),
-                bool enforceToplevelTransformOp = true);
+LogicalResult applyTransforms(
+    Operation *payloadRoot, TransformOpInterface transform,
+    const RaggedArray<MappedValue> &extraMapping = {},
+    const TransformOptions &options = TransformOptions(),
+    bool enforceToplevelTransformOp = true,
+    function_ref<void(TransformState &)> stateInitializer = nullptr,
+    function_ref<LogicalResult(TransformState &)> stateExporter = nullptr);
----------------
kaitingwang wrote:

This is the PR to de-clutter the applyTransforms API per suggestion: https://github.com/llvm/llvm-project/pull/107890


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


More information about the Mlir-commits mailing list