ABataev added inline comments.
================ Comment at: lib/CodeGen/CGOpenMPRuntime.h:904 + /// + virtual bool isStaticChunked(OpenMPDistScheduleClauseKind ScheduleKind, + bool Chunked) const; ---------------- gtbercea wrote: > ABataev wrote: > > I'd rename this into `isDistStaticChunked` > I've used the same naming convention as the isStaticNonchunked function for > consistency. What about this? ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2360 OMPCancelStack.emitExit(*this, S.getDirectiveKind(), CodeGen); + } else if (RT.isStaticChunked(ScheduleKind.Schedule, + /* Chunked */ Chunk != nullptr) && ---------------- ABataev wrote: > This whole code is very similar to the unchunked case. Could you merge it? What about this? ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3421 RT.emitForStaticFinish(*this, S.getBeginLoc(), S.getDirectiveKind()); + } else if (RT.isStaticChunked(ScheduleKind, + /* Chunked */ Chunk != nullptr) && ---------------- ABataev wrote: > Again, very similar to the unchunked code. Merge it. ? ================ Comment at: lib/Sema/SemaOpenMP.cpp:5207 + CombDistCond = + SemaRef.BuildBinOp(CurScope, CondLoc, BO_LE, IV.get(), LastIteration.get()); + } ---------------- ABataev wrote: > Seems to me, you need to use `NumIterations` instead of `LastIteration` Add the tests for the collapsed loops. Repository: rC Clang https://reviews.llvm.org/D53448 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits