[clang] [Clang][OpenMP 6.0] Support positional arguments in `adjust_args` clause (PR #225081)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 06:54:14 PDT 2026
================
@@ -325,6 +325,35 @@ struct OMPInteropInfo final {
llvm::SmallVector<OMPInteropPref, 4> Prefs;
};
+/// One item in an OpenMP 'adjust_args' parameter list.
+struct OMPAdjustArgsItem final {
+ /// One bound of a parameter range.
+ struct Bound final {
+ enum BoundKind : uint8_t { Omitted, Expression, NumArgs };
+
+ BoundKind Kind = Omitted;
+ /// The bound expression, or the logical offset for a NumArgs bound.
+ Expr *E = nullptr;
+ bool IsSubtraction = false;
+ };
+
+ enum ItemKind : uint8_t { Single, Range };
+
+ ItemKind Kind = Single;
+ /// A named parameter or positional expression for a Single item.
+ Expr *E = nullptr;
+ Bound Lower;
+ Bound Upper;
+};
+
+/// The source-level contents of one OpenMP 'adjust_args' clause.
+struct OMPAdjustArgsClause final {
+ OpenMPAdjustArgsOpKind AdjustOp = OMPC_ADJUST_ARGS_unknown;
+ OpenMPNeedDevicePtrModifier NeedDevicePtrModifier =
+ OMPC_NEED_DEVICE_PTR_unknown;
+ llvm::SmallVector<OMPAdjustArgsItem, 4> Items;
----------------
alexey-bataev wrote:
Use tail allocated storage instead
https://github.com/llvm/llvm-project/pull/225081
More information about the cfe-commits
mailing list