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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits