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

Akash Banerjee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 06:32:56 PDT 2023


TIFitis added a comment.

In D146648#4527573 <https://reviews.llvm.org/D146648#4527573>, @kiranchandramohan wrote:

> While looking into this patch, I noticed that the current implementation in Semantics and MLIR requires the MAP clause to always be present. But the standard only says the following,
>
>   At least one map, use_device_addr or use_device_ptr clause must appear on the directive.
>
> I will fix this. But this made having a look at the code generated only with `use_device_addr`, `use_device_ptr` and without `map` difficult.

The test `openmp_target_use_dev_addr_nomap` does not provide any map clause for `%a`, so for `%a `marked with `use_device_addr` it has the same effect as no map clause being present. Key change when `use_device_addr` or `use_device_ptr` is used without providing any map information is that the `map_size` should be set to 0, and only the `OMP_MAP_RETURN_PARAM` flag should be set for the map_type.


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