[PATCH] D150860: [OpenMP] Change clang emitTargetDataCalls to use OMPIRBuilder
Akash Banerjee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 09:25:36 PDT 2023
TIFitis added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10399
+ DeviceID = CGF.Builder.getInt64(OMP_DEVICEID_UNDEF);
+ }
----------------
jdoerfert wrote:
> Move this behind the if generation and guard the emit scalar with a conditional, all is only needed if both Device is present and IfCond is not known true.
I have moved the device generation after the if generation.
But I am not sure what should be the guard here for emitting the scalar.
My idea was to generate something like:
```
%new_dev = alloca ...
if.then
%x = load %device
store %x %new_dev
...
begin_mapper(..., %new_dev, ...)
...
if.then
...
end_mapper(..., %new_dev, ...)
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150860/new/
https://reviews.llvm.org/D150860
More information about the llvm-commits
mailing list