[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 25 09:25:57 PDT 2018
ABataev added a comment.
What about collapsed loops?
================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3390
// UB = min(UB, GlobalUB);
- EmitIgnoredExpr(isOpenMPLoopBoundSharingDirective(S.getDirectiveKind())
+ EmitIgnoredExpr(StaticChunked ||
+ (!StaticChunked &&
----------------
Restore the original code here, the logic can be simplified
================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3396
// IV = LB;
- EmitIgnoredExpr(isOpenMPLoopBoundSharingDirective(S.getDirectiveKind())
+ EmitIgnoredExpr(StaticChunked ||
+ (!StaticChunked &&
----------------
The same
================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3434-3454
+ if (StaticChunked)
+ EmitOMPInnerLoop(S, LoopScope.requiresCleanups(), Cond, IncExpr,
+ [&S, LoopExit, &CodeGenLoop](CodeGenFunction &CGF) {
+ CodeGenLoop(CGF, S, LoopExit);
+ },
+ [&S](CodeGenFunction &CGF) {
+ CGF.EmitIgnoredExpr(S.getCombinedNextLowerBound());
----------------
Please, simplify this
Repository:
rC Clang
https://reviews.llvm.org/D53448
More information about the cfe-commits
mailing list