aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2025-06-24 15:38:23 -0500
committerGitHub <noreply@github.com>2025-06-24 15:38:23 -0500
commit3a71884ab1a508aed6e3e2fd79a83e7d70f34784 (patch)
tree724b55b780075e5ac41bef7df18f0dff01c9ee14 /clang/lib/CodeGen/CodeGenModule.cpp
parent3413aa83f356f0424477658b9295734fdf914552 (diff)
downloadllvm-3a71884ab1a508aed6e3e2fd79a83e7d70f34784.zip
llvm-3a71884ab1a508aed6e3e2fd79a83e7d70f34784.tar.gz
llvm-3a71884ab1a508aed6e3e2fd79a83e7d70f34784.tar.bz2
[flang][OpenMP] Map device pointers on host device as well (#145562)
Given a TARGET DATA construct with USE_DEVICE_PTR(x) and IF(FALSE), the compiler will crash if `x` was used in the body. The cause of the crash is that the MLIR->LLVM codegen tries to look up the translated value of x, but one had not been mapped. Given an IF clause, the translation will generate an if-then-else construct, with the "else" block corresponding to the false condition, i.e. the host device playing the role of the target device. In that block, still process the USE_DEVICE_ADDR/USE_DEVICE_PTR clauses, which will cause the translation mappings to be created. Fixes https://github.com/llvm/llvm-project/issues/145558
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions