[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Add OpenMPToLLVMIRTranslation support for is_device_ptr (PR #169367)

Kareem Ergawy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 26 22:15:16 PST 2025


================
@@ -3875,6 +3870,10 @@ convertClauseMapFlags(omp::ClauseMapFlags mlirFlags) {
   if (mapTypeToBool(omp::ClauseMapFlags::attach))
     mapType |= llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_ATTACH;
 
+  // No dedicated LLVM runtime flag for is_device_ptr; handled separately.
+  if (mapTypeToBool(omp::ClauseMapFlags::is_device_ptr))
+    mapType |= llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_RETURN_PARAM;
----------------
ergawy wrote:

Why do we split filling in the `mapType` between this function and the caller below where we add `OMP_MAP_TARGET_PARAM` and `OMP_MAP_LITERAL`? Can we do all that here instead?

Also, do we need both `OMP_MAP_RETURN_PARAM` and `OMP_MAP_TARGET_PARAM`? Or is `OMP_MAP_TARGET_PARAM` enough?

https://github.com/llvm/llvm-project/pull/169367


More information about the llvm-branch-commits mailing list