aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2025-05-22 15:25:53 +0100
committerGitHub <noreply@github.com>2025-05-22 15:25:53 +0100
commite9cba3c8edca3dc805e82afbb482b3938cb96ae2 (patch)
tree5e2ef2b38070c7b7f8f3e207863719aa0c66af49 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentb048f3f8d7a6ff178dafa82e47f2dddd75c95258 (diff)
downloadllvm-e9cba3c8edca3dc805e82afbb482b3938cb96ae2.zip
llvm-e9cba3c8edca3dc805e82afbb482b3938cb96ae2.tar.gz
llvm-e9cba3c8edca3dc805e82afbb482b3938cb96ae2.tar.bz2
[flang][OpenMP] use attribute for delayed privatization barrier (#140092)
Fixes #136357 The barrier needs to go between the copying into firstprivate variables and the initialization call for the OpenMP construct (e.g. wsloop). There is no way of expressing this in MLIR because for delayed privatization that is all implicit (added in MLIR->LLVMIR conversion). The previous approach put the barrier immediately before the wsloop (or similar). For delayed privatization, the firstprivate copy code would then be inserted after that, opening the possibility for the race observed in the bug report. This patch solves the issue by instead setting an attribute on the mlir operation, which will instruct openmp dialect to llvm ir conversion to insert a barrier in the correct place.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions