diff options
author | Tom Eccles <tom.eccles@arm.com> | 2025-05-22 15:24:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-22 15:24:02 +0100 |
commit | a24ed7d4775d119029bc8539c54fba03dba4366f (patch) | |
tree | 1193368e335f611a553c3488c75ecd37d8024495 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 03cc50fd7db734b62783b26e6c6fcfb4f7e33be0 (diff) | |
download | llvm-a24ed7d4775d119029bc8539c54fba03dba4366f.zip llvm-a24ed7d4775d119029bc8539c54fba03dba4366f.tar.gz llvm-a24ed7d4775d119029bc8539c54fba03dba4366f.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions