[flang-commits] [flang] [flang][OpenMP] Do not skip privatization of linear variable if it is OmpPreDetermined (PR #144315)
Kajetan Puchalski via flang-commits
flang-commits at lists.llvm.org
Mon Jun 16 05:24:46 PDT 2025
================
@@ -204,6 +204,42 @@ void DataSharingProcessor::collectOmpObjectListSymbol(
}
void DataSharingProcessor::collectSymbolsForPrivatization() {
+ // Add checks here for exceptional cases where privatization is not
+ // needed and be deferred to a later phase (like OpenMP IRBuilder).
+ // Such cases are suggested to be clearly documented and explained
+ // instead of being silently skipped
+ auto isException = [&](const Fortran::semantics::Symbol *sym) -> bool {
+ // `OmpPreDetermined` symbols cannot be exceptions since
+ // their privatized symbols are heavily used in FIR.
+ if (sym->test(Fortran::semantics::Symbol::Flag::OmpPreDetermined))
+ return false;
+
+ // The handling of linear clause is deferred to the OpenMP
+ // IRBuilder which is responsible for all it's aspects,
----------------
mrkajetanp wrote:
nit: s/it's/its
https://github.com/llvm/llvm-project/pull/144315
More information about the flang-commits
mailing list