[flang-commits] [flang] [flang][OpenMP] Try to unify induction var privatization for sequential loops inside parallel regions. (PR #91116)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Tue May 7 07:03:24 PDT 2024
================
@@ -344,7 +353,6 @@ void DataSharingProcessor::collectSymbols(
assert(curScope && "couldn't find current scope");
if (isPrivatizable(*sym) && !symbolsInNestedRegions.contains(sym) &&
!privatizedSymbols.contains(sym) &&
- !sym->test(Fortran::semantics::Symbol::Flag::OmpPreDetermined) &&
----------------
ergawy wrote:
> Finally, in the non-delayed privatization path, pre-determined symbols were already being skipped:
Indeed. And this is what I am trying to prevent from happening here both for early and delayed privatization. AFAIU, I don't think there is a reason to have 2 different code-gen paths for pre-determined vs. non-pre-determined variables. Please let me know if I am mistaken here.
More context for this is in this Slack thread: https://flang-compiler.slack.com/archives/C01PY03PP9P/p1714729085154889.
> if you remove default(private), are induction variables correctly privatized?
In that case, they are not privatized at all in the sense that their alloca's are emitted simply as part of emitting the code for the do concurrent for which they are used as induction variables. They are not marked as pre-determined.
https://github.com/llvm/llvm-project/pull/91116
More information about the flang-commits
mailing list