summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2018-10-29 15:23:23 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2018-10-29 15:23:23 +0000
commit669dbde7a5d48f34c121129cd06acc43465f2c48 (patch)
tree892955f5db40f716f920672b8258552f20715ba7 /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
parent635d49e1dffe21c61dc66ba639fd0b9013825db1 (diff)
downloadbcm5719-llvm-669dbde7a5d48f34c121129cd06acc43465f2c48.tar.gz
bcm5719-llvm-669dbde7a5d48f34c121129cd06acc43465f2c48.zip
[OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases.
Summary: This patch enables the choosing of the default schedule for parallel for loops even in non-SPMD cases. Reviewers: ABataev, caomhin Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D53443 llvm-svn: 345507
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
index 2aa8e83c2c0..c8dd1a6f7b6 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
@@ -4238,16 +4238,17 @@ void CGOpenMPRuntimeNVPTX::getDefaultDistScheduleAndChunk(
Chunk = CGF.EmitScalarConversion(getNVPTXNumThreads(CGF),
CGF.getContext().getIntTypeForBitwidth(32, /*Signed=*/0),
S.getIterationVariable()->getType(), S.getBeginLoc());
+ return;
}
+ CGOpenMPRuntime::getDefaultDistScheduleAndChunk(
+ CGF, S, ScheduleKind, Chunk);
}
void CGOpenMPRuntimeNVPTX::getDefaultScheduleAndChunk(
CodeGenFunction &CGF, const OMPLoopDirective &S,
OpenMPScheduleClauseKind &ScheduleKind,
llvm::Value *&Chunk) const {
- if (getExecutionMode() == CGOpenMPRuntimeNVPTX::EM_SPMD) {
- ScheduleKind = OMPC_SCHEDULE_static;
- Chunk = CGF.Builder.getIntN(CGF.getContext().getTypeSize(
- S.getIterationVariable()->getType()), 1);
- }
+ ScheduleKind = OMPC_SCHEDULE_static;
+ Chunk = CGF.Builder.getIntN(CGF.getContext().getTypeSize(
+ S.getIterationVariable()->getType()), 1);
}
OpenPOWER on IntegriCloud