This patch adds clang (parsing, sema, serialization, codegen) support for the 'depend' clause on the 'taskwait' directive.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/AST/StmtOpenMP.h | ||
---|---|---|
2573–2582 | Need to add descriptions for the new parameters | |
clang/lib/AST/StmtOpenMP.cpp | ||
746–749 | Just return createDirective<OMPTaskwaitDirective>(C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc, EndLoc); | |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
6274 | Need to fix this one too |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
6274 | How would you recommend this case should be handled? Is it acceptable to change the if-condition to CGF.CGM.getLangOpts().OpenMPIRBuilder && Data.Dependences.empty()? |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
6274 | I just mean that need to implement support for this extended taskwait in OMPBuilder too. |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
6274 | Is that something you think needs to be implemented in this patch? Is there a general policy that new OpenMP features implemented in clang codegen must also be implemented in the IRBuilder? I ask, because there doesn't appear to be any support for explicit tasks or task dependences in the IRBuilder currently. |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
6274 | Not necessarily, just saying that need not forget to implement it. Worth adding TODO: |
Updated comments, added TODO for handing extended taskwait directive in the OpenMPIRBuilder, and added semantic check that 'mutexinoutset' should not be specified in the 'depend' clause on 'taskwait'.
I think I've addressed the first set of comments. I added a TODO comment for the OMP IRBuilder (HPE has not implemented this). I also added a diagnostic error message for the case of a mutexinoutset being specified in a depend clause on the taskwait directive, as this is specifically disallowed. Can reviewers take another look and let me know if this looks ready?
Need to add descriptions for the new parameters