[Mlir-commits] [mlir] [mlir] introduce transform.loop.forall_to_for (PR #65474)
Matthias Springer
llvmlistbot at llvm.org
Wed Sep 6 07:55:39 PDT 2023
================
@@ -29,6 +29,33 @@ def ApplyForLoopCanonicalizationPatternsOp : Op<Transform_Dialect,
def Transform_ScfForOp : Transform_ConcreteOpType<"scf.for">;
+def ForallToForOp : Op<Transform_Dialect, "loop.forall_to_for",
+ [FunctionalStyleTransformOpTrait, MemoryEffectsOpInterface,
+ DeclareOpInterfaceMethods<TransformOpInterface>]> {
+ let summary = "Converts scf.forall into a nest of scf.for operations";
+ let description = [{
+ Converts the `scf.forall` operation pointed to by the given handle into a
+ set of nested `scf.for` operations. Each new operation corresponds to one
+ induction variable of the original "multifor" loop.
+
+ The operand handle must be associated with exactly one payload operation.
+
+ Loops with returning values are currently not supported.
+
+ #### Return Modes
+
+ Consumes the operand handle. Produces a silenceable failure if the operand
+ is not associated with a single `scf.forall` payload operation.
+ Returns as many handles as the given `forall` op has induction variables.
----------------
matthias-springer wrote:
Mention that the result handle is mapped to the new `scf.for` ops.
https://github.com/llvm/llvm-project/pull/65474
More information about the Mlir-commits
mailing list