[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

Akash Banerjee via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 31 02:32:01 PST 2025


================
@@ -2709,13 +2709,23 @@ getRefPtrIfDeclareTarget(mlir::Value value,
 }
 
 namespace {
+// Append customMappers information to existing MapInfosTy
+struct MapInfosTy : llvm::OpenMPIRBuilder::MapInfosTy {
+  SmallVector<Operation *, 4> Mappers;
----------------
TIFitis wrote:

Yes, we can do that, but I don't think we should. Semantically they are used in different stages for different purposes. We don't stand to gain much from merging these two types, and using the same type might only lead to confusion in the future.

If anything, using the two different types should have a slightly less memory footprint, as we don't need any of the `mapInfoData` specific members during CodeGen in `OMPIRBuilder`.

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


More information about the llvm-branch-commits mailing list