[clang] [OpenACC][CIR] Implement 'self' lowering on compute constructs (PR #135851)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 15 13:51:14 PDT 2025


================
@@ -430,6 +430,11 @@ class OpenACCSelfClause final
   }
 
   bool isConditionExprClause() const { return HasConditionExpr.has_value(); }
+  bool isVarListClause() const { return !isConditionExprClause(); }
+  bool isEmptySelfClause() const {
+    return (isConditionExprClause() && !hasConditionExpr()) ||
+           (!isConditionExprClause() && getVarList().empty());
----------------
erichkeane wrote:

These convenience functions made a lot of sense/got good use in codegen, so they seemed sensible to add.

https://github.com/llvm/llvm-project/pull/135851


More information about the cfe-commits mailing list