[llvm-branch-commits] [mlir] [MLIR][OpenMP] Refactor omp.target_allocmem to allow reuse, NFC (PR #161861)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 6 06:41:28 PDT 2025
================
@@ -547,6 +548,58 @@ class OpenMP_HasDeviceAddrClauseSkip<
def OpenMP_HasDeviceAddrClause : OpenMP_HasDeviceAddrClauseSkip<>;
+//===----------------------------------------------------------------------===//
+// Not in the spec: Clause-like structure to hold heap allocation information.
+//===----------------------------------------------------------------------===//
+
+class OpenMP_HeapAllocClauseSkip<
+ bit traits = false, bit arguments = false, bit assemblyFormat = false,
+ bit description = false, bit extraClassDeclaration = false
+ > : OpenMP_Clause<traits, arguments, assemblyFormat, description,
+ extraClassDeclaration> {
+ let traits = [
+ MemoryEffects<[MemAlloc<DefaultResource>]>
+ ];
+
+ let arguments = (ins
+ TypeAttr:$in_type,
+ OptionalAttr<StrAttr>:$uniq_name,
+ OptionalAttr<StrAttr>:$bindc_name,
+ Variadic<IntLikeType>:$typeparams,
+ Variadic<IntLikeType>:$shape
+ );
+
+ // The custom parser doesn't parse `uniq_name` and `bindc_name`. This is
+ // handled by the attr-dict, which must be present in the operation's
+ // `assemblyFormat`.
----------------
Meinersbur wrote:
What is the reason to not parse it in `parseHeapAllocClause`?
https://github.com/llvm/llvm-project/pull/161861
More information about the llvm-branch-commits
mailing list