[Mlir-commits] [mlir] [MLIR][Transform] Allow stateInitializer and stateExporter for applyTransforms (PR #101186)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri Sep 6 15:23:47 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);
----------------
ftynse wrote:
Would it make sense to put these inside `TransformOptions` to avoid bloating the API?
https://github.com/llvm/llvm-project/pull/101186
More information about the Mlir-commits
mailing list