This patch adds a new code generation path for bound sharing directives containing distribute parallel for. The new code generation scheme applies to chunked schedules on distribute and parallel for directives. The scheme simplifies the code that is being generated by eliminating the need for an outer for loop over chunks for both distribute and parallel for directives. In the case of distribute it applies to any sized chunk while in the parallel for case it only applies when chunk size is 1.
Details
- Reviewers
ABataev caomhin - Commits
- rGe92567601b4b: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel…
rC345509: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel…
rL345509: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel…
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 24208 Build 24207: arc lint + arc unit
Event Timeline
lib/CodeGen/CGOpenMPRuntime.h | ||
---|---|---|
904 | I'd rename this into isDistStaticChunked | |
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | ||
4249 | If the ChunkOne field is not required, you need to restore original code here | |
lib/CodeGen/CGStmtOpenMP.cpp | ||
2385 | This whole code is very similar to the unchunked case. Could you merge it? | |
2387 | It allows you to check only the implicit case, what about if the user explicitly specifies that chunk is 1? | |
3454 | Again, very similar to the unchunked code. Merge it. | |
lib/Sema/SemaOpenMP.cpp | ||
5207 | Seems to me, you need to use NumIterations instead of LastIteration |
lib/CodeGen/CGOpenMPRuntime.h | ||
---|---|---|
904 | I've used the same naming convention as the isStaticNonchunked function for consistency. |
I'd rename this into isDistStaticChunked