[OPENMP] Fix PR47999: correctly map implicit firstprivates in outer tasks.
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 17 Nov 2020 13:33:25 +0000 (05:33 -0800)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 17 Nov 2020 18:21:12 +0000 (10:21 -0800)
commit0333567c47c0d496bba146cd4f7b65a8ef8ba113
tree06eb285d84c01f5cfc32dc1c08e96b31c2e5db81
parent48138e7338c19f4f7347e470e9d10b0f24ff893d
[OPENMP] Fix PR47999: correctly map implicit firstprivates in outer tasks.

If the variable is implicitly firstprivatized in the inner task-based
region, it also must be firstprivatized in outer task-based regions.
Previously firstprivates were captured in tasks but later it was
optimized to reduce the memory usage. But still need to mark such
variables as implicit firstprivate in outer tasks.

Differential Revision: https://reviews.llvm.org/D91627
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/task_in_task_firstprivate_codegen.cpp [new file with mode: 0644]