[all-commits] [llvm/llvm-project] a24ed7: [mlir][OpenMP] add attribute for privatization bar...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Thu May 22 07:24:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a24ed7d4775d119029bc8539c54fba03dba4366f
https://github.com/llvm/llvm-project/commit/a24ed7d4775d119029bc8539c54fba03dba4366f
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
M mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
M mlir/test/Dialect/OpenMP/ops.mlir
Log Message:
-----------
[mlir][OpenMP] add attribute for privatization barrier (#140089)
A barrier is needed at the end of initialization/copying of private
variables if any of those variables is lastprivate. This ensures that
all firstprivate variables receive the original value of the variable
before the lastprivate clause overwrites it.
Previously this barrier was added by the flang fontend, but there is not
a reliable way to put the barrier in the correct place for delayed
privatization, and the OpenMP dialect could some day have other users.
It is important that there are safe ways to use the constructs available
in the dialect.
lastprivate is currently not modelled in the OpenMP dialect, and so
there is no way to reliably determine whether there were lastprivate
variables. Therefore the frontend will have to provide this information
through this new attribute.
Part of a series of patches to fix
https://github.com/llvm/llvm-project/issues/136357
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list