[PATCH] D21564: [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

Carlo Bertolli via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 22 07:44:19 PDT 2016

carlo.bertolli marked 2 inline comments as done.
carlo.bertolli added a comment.

Thanks very much for the quick review. I am about to update the patch reflecting your comments and to the latest trunk.

Comment at: include/clang/AST/StmtOpenMP.h:2884-2896
@@ +2883,15 @@
+  /// Increment expression for distribute loop (OMPLoopDirective contains
+  /// increment expression for #for loop)
+  Expr *DistIncExpr;
+  /// \brief EnsureUpperBound for #pragma omp for: expression LB = PrevUB;
+  Expr *PrevEUBExpr;
+  Expr *getDistInc() const { return DistIncExpr; }
+  Expr *getPrevEnsureUpperBound() const { return PrevEUBExpr; }
+  void setDistInc(Expr *DistInc) { DistIncExpr = DistInc; }
+  void setPrevEnsureUpperBound(Expr *PrevEUB) { PrevEUBExpr = PrevEUB; }
ABataev wrote:
> Don't like the idea of public fields with protected setters. If these fields are required, they must be the part of the base OMPLoopDirective and reuse the logic for other helper expressions.
> Also, I believe, these fields are required for codegen. If so, it is better to add them in codegen patch
I removed the field and will add new fields to OMPLoopDirective later on when I produce a code gen patch.


More information about the cfe-commits mailing list