[Mlir-commits] [mlir] [mlir][acc] Add MappableType API for generating private recipe init (PR #148293)
Valentin Clement バレンタイン クレメン
llvmlistbot at llvm.org
Fri Jul 11 13:51:42 PDT 2025
================
@@ -180,6 +180,36 @@ def OpenACC_MappableTypeInterface : TypeInterface<"MappableType"> {
return ::mlir::acc::VariableTypeCategory::uncategorized;
}]
>,
+ InterfaceMethod<
+ /*description=*/[{
+ Generates the operations that would be normally placed in a recipe's
+ init region. It inserts at the builder's current location.
+ It can be used either to directly "inline" the init region
+ or if the caller sets the insertion point to inside a recipe body,
+ it fills it in. This does not generate the `acc.yield` that normally
+ would terminate a recipe.
+
+ The `extents` are optional and can be empty - it is only when a
+ slice of the private variable needs allocated.
----------------
clementval wrote:
```suggestion
slice of the private variable needs allocation.
```
?
https://github.com/llvm/llvm-project/pull/148293
More information about the Mlir-commits
mailing list