================
@@ -8541,6 +8541,101 @@ class OMPIsDevicePtrClause final
}
};
+/// This represents clause 'graph_id' in the '#pragma omp taskgraph"
+/// directives.
+///
+/// \code
+/// #pragma omp taskgraph graph_id(a)
+class OMPGraphIdClause final
+ : public OMPOneStmtClause<llvm::omp::OMPC_graph_id, OMPClause> {
+ friend class OMPClauseReader;
+
+ /// Set condition.
+ void setId(Expr *Id) { setStmt(Id); }
+
+public:
+ /// Build 'graph_id' clause with identifier value \a Id.
+ ///
+ /// \param Id Id value for the clause.
+ /// \param StartLoc Starting location of the clause.
+ /// \param LParenLoc Location of '('.
+ /// \param EndLoc Ending location of the clause.
+ OMPGraphIdClause(Expr *Id, SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation EndLoc)
+ : OMPOneStmtClause(Id, StartLoc, LParenLoc, EndLoc) {}
+
+ /// Build an empty clause.
+ OMPGraphIdClause() : OMPOneStmtClause() {}
+
+ /// Returns condition.
+ Expr *getId() const { return getStmtAs<Expr>(); }
+};
+
+// This represents clause 'graph_reset' in the '#pragma omp taskgraph"
+/// directives.
+///
+/// \code
+/// #pragma omp taskgraph graph_reset(true)
+class OMPGraphResetClause final : public OMPClause {
----------------
jtb20 wrote:
The reason it isn't is because the argument is optional for graph_reset --
although without it, the graph would always be reset, which doesn't seem very
useful. All the same, the spec says it can be omitted, so there we are.
I don't think OMPOneStmtClause can have a null stmt, but I could be wrong?
https://github.com/llvm/llvm-project/pull/194048
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits