[flang-commits] [flang] [flang][OpenMP] Update all `lastprivate` symbols, not just in clauses (PR #125628)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Tue Feb 4 06:37:28 PST 2025
================
@@ -207,6 +207,9 @@ void DataSharingProcessor::collectSymbolsForPrivatization() {
}
}
+ // TODO For common blocks, add the underlying objects within the block. Doing
+ // so, we won't need to explicitely handle block objects (or forget to do
+ // so).
----------------
luporl wrote:
AFAIR, there are 2 things that complicate the handling of `sections`:
1. `omp.sections` can only have `omp.section` operations. So, privatizations must be performed before `omp.sections`.
2. `lastprivate` code must be inserted at the end of the last `omp.section`.
I guess this could be moved to DataSharingProcessor, but some special handling for `sections` would still be needed.
Also, we need to be careful when inserting barriers. As not all threads execute each section, inserting a barrier in a section can hang the program.
https://github.com/llvm/llvm-project/pull/125628
More information about the flang-commits
mailing list