[llvm-branch-commits] [OpenMP][MLIR] Add new arguments to map_info to help support record type maps (PR #82851)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 22 06:17:05 PDT 2024


================
@@ -1452,10 +1454,14 @@ def MapInfoOp : OpenMP_Op<"map.info", [AttrSizedOperandSegments]> {
     - `var_type`: The type of the variable to copy.
     - `var_ptr_ptr`: Used when the variable copied is a member of a class, structure
       or derived type and refers to the originating struct.
-    - `members`:  Used to indicate mapped child members for the current MapInfoOp,
-       represented as other MapInfoOp's, utilised in cases where a parent structure
-       type and members of the structure type are being mapped at the same time.
+    - `members`: Used to indicate mapped child members for the current MapInfoOp, 
+       represented as other MapInfoOp's, utilised in cases where a parent structure 
+       type and members of the structure type are being mapped at the same time. 
        For example: map(to: parent, parent->member, parent->member2[:10])
+    - `members_index`: Used to indicate the ordering of members within the containing 
+       parent (generally a record type such as a structure, class or derived type),
+       e.g. struct {int x, float y, double z}, x would be 0, y would be 1, and z 
+       would be 2. This aids the mapping 
----------------
skatrak wrote:

Nit: It looks like the last sentence in the description here was cut short as well, or maybe just missing a period.
```suggestion
    - `members_index`: Used to indicate the ordering of members within the containing
       parent (generally a record type such as a structure, class or derived type),
       e.g. struct {int x, float y, double z}, x would be 0, y would be 1, and z
       would be 2. This aids the mapping
```

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


More information about the llvm-branch-commits mailing list