[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 14:51:13 PDT 2020


ABataev added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7927
+          CurStrides.push_back(CurStride);
+          DI++;
+        }
----------------
Use preincrement


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8243
+            IsFirstComponentList, L.IsImplicit, CurNonContigInfo,
+            /*OverlappedElements=*/llvm::None);
 
----------------
No need to add `/*OverlappedElements=*/llvm::None` here, it is default value.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8900-8902
+  if (IsNonContiguous) {
+    if (Info.Offsets.empty())
+      return;
----------------
Better just to have something like this:
```
if (!IsNonContiguous || Info.Offsets.empty() || Info.NumberOfPtrs == 0)
  return;
...
```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79972





More information about the cfe-commits mailing list