Adds basic parsing/sema/serialization support for the #pragma omp teams loop directive.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Also, would be good to add test(s) to test/Analysis/cfg-openmp.cpp
clang/lib/Basic/OpenMPKinds.cpp | ||
---|---|---|
706 | Why do you need OMPD_unknown region here? | |
clang/lib/Sema/SemaOpenMP.cpp | ||
4279–4285 | Copy/paste? The binding here is known aready, no? | |
10219–10239 | Can we move this check to ActOnOpenMPLastprivate? To avoid copy/paste and double iteration on list items. | |
clang/test/OpenMP/teams_generic_loop_ast_print.cpp | ||
10–11 | Why need a dump here? |
clang/lib/Basic/OpenMPKinds.cpp | ||
---|---|---|
706 | I added this for the same reason as loop, assuming it could be different based on binding. What do you think it should be instead? | |
clang/lib/Sema/SemaOpenMP.cpp | ||
4279–4285 | Since I didn't write codegen for this I don't really know what this should be. The codegen I've seen seems to produce different code depending on the binding in this case, so I left an unknown region to be replaced by the right code when someone does the codegen. I'll do whatever you want here. What do you think it should be? | |
10219–10239 | There is a timing problem with that. ActOnOpenMPLastprivate happens before ActOnOpenMPLoopInitialization so DSAStack->isLoopControlVariable() doesn't work there. I can certainly factor that though. | |
clang/test/OpenMP/teams_generic_loop_ast_print.cpp | ||
10–11 | I guess it is not really needed. I'll remove it. |
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
4279–4285 | I thought the binding region here is teams, so only OMPD_teams should be enough, without extra OMPD_unknown. |
Why do you need OMPD_unknown region here?