[flang-commits] [flang] [flang][OpenMP] incorrect handling for local variable in OpenMP parallel workshare firstprivate(P) (PR #195616)
via flang-commits
flang-commits at lists.llvm.org
Wed Jun 3 03:34:28 PDT 2026
================
@@ -296,6 +301,74 @@ static mlir::func::FuncOp createCopyFunc(mlir::Location loc, mlir::Type varType,
return funcOp;
}
+/// Creates a copy function for box types that copies the array DATA
+/// (not just the descriptor) using the Fortran runtime's Assign function.
+/// This is needed for copyprivate of dynamically-sized arrays where each
+/// thread has its own allocation and needs the data copied from the
+/// single-executing thread.
+static mlir::func::FuncOp createBoxDataCopyFunc(mlir::Location loc,
----------------
SunilKuravinakop wrote:
Inline implementation is already being done when -O1 or -O2 is being used. At the level of -emit-mlir, call "fir.call @_FortranAAssign" is replaced with omp.wsloop and inline instructions. I hope my explanation is clear.
https://github.com/llvm/llvm-project/pull/195616
More information about the flang-commits
mailing list