[Openmp-commits] [openmp] [Flang][OpenMP][MLIR] Initial array section mapping MLIR -> LLVM-IR lowering utilising omp.bounds (PR #68689)

Akash Banerjee via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 17 07:52:51 PDT 2023

@@ -1629,13 +1622,153 @@ getRefPtrIfDeclareTarget(mlir::Value value,
   return nullptr;
+// A small helper structure to contain data gathered
+// for map lowering and coalese it into one area and
+// avoiding extra computations such as searches in the
+// llvm module for lowered mapped varibles or checking
+// if something is declare target (and retrieving the
+// value).
+struct MapData {
TIFitis wrote:

Most of the data in this struct seems to overlap with `llvm::OpenMPIRBuilder::MapInfoTy`.

Instead of creating a new structTy, I'd rather inherit the existing MapInfosTy and add to it.

Similar to `struct MapCombinedInfoTy : llvm::OpenMPIRBuilder::MapInfosTy` in `clang/lib/CodeGen/CGOpenMPRuntime.cpp`.


More information about the Openmp-commits mailing list