[PATCH] D146648: [MLIR][OpenMP] Added MLIR translation support for use_device clauses

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 07:27:23 PDT 2023


kiranchandramohan added a comment.

I am starting to go through the patch.



================
Comment at: mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:1455-1471
+    unsigned infoIndex;
+    if (findMapInfo(mapOpValue, infoIndex)) {
+      combinedInfo.Types[infoIndex] |=
+          llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_RETURN_PARAM;
+      combinedInfo.DevicePointers[infoIndex] =
+          llvm::OpenMPIRBuilder::DeviceInfoTy::Address;
+    } else {
----------------
This block seems to be similar to `devPtrOperands`. Could you share code here?


================
Comment at: mlir/test/Target/LLVMIR/omptarget-llvm.mlir:170
 
 // -----
+
----------------
Please add a testcase with both `use_device_ptr` and `use_device_addr`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146648/new/

https://reviews.llvm.org/D146648



More information about the llvm-commits mailing list