The global variable should be captured in the region only if it was
privitized in the region or in any of the outer regions. Otherwise, it
should not be captured.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
2127 | An extra check for != DSA_firstprivate will be required. |
Comment Actions
LGTM.
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
2127 | OK. Needs to be part of D75591. @atmnpatel Can you include this in your patch? |
clang/lib/Sema/SemaOpenMP.cpp | ||
---|---|---|
2127 | Most probably, even this won't be necessary. Either getTopDSA will rerurn OMPC_firstprivate, or the if statement after this one will return false and control fallback to the default return nullptr; |
Does DSAStack->getDefaultDSA() != DSA_none work once we have (first)private default kinds or do we need to check for shared explicitly?