|
12 | 12 |
|
13 | 13 | #include "flang/Lower/Bridge.h" |
14 | 14 |
|
| 15 | +#include "OpenMP/DataSharingProcessor.h" |
15 | 16 | #include "flang/Lower/Allocatable.h" |
16 | 17 | #include "flang/Lower/CallInterface.h" |
17 | 18 | #include "flang/Lower/Coarray.h" |
@@ -2043,38 +2044,44 @@ class FirConverter : public Fortran::lower::AbstractConverter { |
2043 | 2044 | bool useDelayedPriv = |
2044 | 2045 | enableDelayedPrivatizationStaging && doConcurrentLoopOp; |
2045 | 2046 | llvm::SetVector<const Fortran::semantics::Symbol *> allPrivatizedSymbols; |
2046 | | - llvm::SmallSet<const Fortran::semantics::Symbol *, 16> mightHaveReadHostSym; |
2047 | 2047 |
|
2048 | | - for (const Fortran::semantics::Symbol *symToPrivatize : info.localSymList) { |
| 2048 | + for (const Fortran::semantics::Symbol *sym : info.localSymList) { |
2049 | 2049 | if (useDelayedPriv) { |
2050 | 2050 | Fortran::lower::privatizeSymbol<fir::LocalitySpecifierOp>( |
2051 | | - *this, this->getFirOpBuilder(), localSymbols, allPrivatizedSymbols, |
2052 | | - mightHaveReadHostSym, symToPrivatize, &privateClauseOps); |
| 2051 | + *this, this->getFirOpBuilder(), localSymbols, |
| 2052 | + [this](fir::LocalitySpecifierOp result, mlir::Type argType) { |
| 2053 | + TODO(this->toLocation(), |
| 2054 | + "Localizers that need init regions are not supported yet."); |
| 2055 | + }, |
| 2056 | + allPrivatizedSymbols, sym, &privateClauseOps); |
2053 | 2057 | continue; |
2054 | 2058 | } |
2055 | 2059 |
|
2056 | | - createHostAssociateVarClone(*symToPrivatize, /*skipDefaultInit=*/false); |
| 2060 | + createHostAssociateVarClone(*sym, /*skipDefaultInit=*/false); |
2057 | 2061 | } |
2058 | 2062 |
|
2059 | | - for (const Fortran::semantics::Symbol *symToPrivatize : |
2060 | | - info.localInitSymList) { |
| 2063 | + for (const Fortran::semantics::Symbol *sym : info.localInitSymList) { |
2061 | 2064 | if (useDelayedPriv) { |
2062 | 2065 | Fortran::lower::privatizeSymbol<fir::LocalitySpecifierOp>( |
2063 | | - *this, this->getFirOpBuilder(), localSymbols, allPrivatizedSymbols, |
2064 | | - mightHaveReadHostSym, symToPrivatize, &privateClauseOps); |
| 2066 | + *this, this->getFirOpBuilder(), localSymbols, |
| 2067 | + [this](fir::LocalitySpecifierOp result, mlir::Type argType) { |
| 2068 | + TODO(this->toLocation(), |
| 2069 | + "Localizers that need init regions are not supported yet."); |
| 2070 | + }, |
| 2071 | + allPrivatizedSymbols, sym, &privateClauseOps); |
2065 | 2072 | continue; |
2066 | 2073 | } |
2067 | 2074 |
|
2068 | | - createHostAssociateVarClone(*symToPrivatize, /*skipDefaultInit=*/true); |
| 2075 | + createHostAssociateVarClone(*sym, /*skipDefaultInit=*/true); |
2069 | 2076 | const auto *hostDetails = |
2070 | | - symToPrivatize->detailsIf<Fortran::semantics::HostAssocDetails>(); |
| 2077 | + sym->detailsIf<Fortran::semantics::HostAssocDetails>(); |
2071 | 2078 | assert(hostDetails && "missing locality spec host symbol"); |
2072 | 2079 | const Fortran::semantics::Symbol *hostSym = &hostDetails->symbol(); |
2073 | 2080 | Fortran::evaluate::ExpressionAnalyzer ea{semanticsContext}; |
2074 | 2081 | Fortran::evaluate::Assignment assign{ |
2075 | | - ea.Designate(Fortran::evaluate::DataRef{*symToPrivatize}).value(), |
| 2082 | + ea.Designate(Fortran::evaluate::DataRef{*sym}).value(), |
2076 | 2083 | ea.Designate(Fortran::evaluate::DataRef{*hostSym}).value()}; |
2077 | | - if (Fortran::semantics::IsPointer(*symToPrivatize)) |
| 2084 | + if (Fortran::semantics::IsPointer(*sym)) |
2078 | 2085 | assign.u = Fortran::evaluate::Assignment::BoundsSpec{}; |
2079 | 2086 | genAssignment(assign); |
2080 | 2087 | } |
|
0 commit comments