================ @@ -20,25 +20,42 @@ namespace mlir { class Region; } // namespace mlir +namespace Fortran { +namespace semantics { +class Symbol; +} // namespace semantics +} // namespace Fortran + namespace fir { class FirOpBuilder; class ShapeShiftOp; } // namespace fir namespace Fortran { namespace lower { +class AbstractConverter; + namespace omp { +enum class DeclOperationKind { Private, FirstPrivate, Reduction }; +inline bool isPrivatization(DeclOperationKind kind) { + return (kind == DeclOperationKind::FirstPrivate) || + (kind == DeclOperationKind::Private); +} +inline bool isReduction(DeclOperationKind kind) { + return kind == DeclOperationKind::Reduction; +} + /// Generate init and cleanup regions suitable for reduction or privatizer /// declarations. `scalarInitValue` may be nullptr if there is no default -/// initialization (for privatization). -void populateByRefInitAndCleanupRegions(fir::FirOpBuilder &builder, - mlir::Location loc, mlir::Type argType, - mlir::Value scalarInitValue, - mlir::Block *initBlock, - mlir::Value allocatedPrivVarArg, - mlir::Value moldArg, - mlir::Region &cleanupRegion); +/// initialization (for privatization). If this is for a privatizer, set +/// `isPrivate` to `true`. ---------------- ergawy wrote:
I think this needs to be updated to refer to `kind`? https://github.com/llvm/llvm-project/pull/124019 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits