[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
Thu May 28 09:50:32 PDT 2020


ABataev added a comment.

Did you think about implementing it in the compiler instead of the runtime?



================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8397-8400
+      if (OASE || OAShE ||
+          dyn_cast<ArraySubscriptExpr>(I->getAssociatedExpression())) {
+        DimSize++;
+      }
----------------
Do you really need to count `DimSize` for array shaping operators and array subscript expressions? I don't see tests for it.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:16537
         AllowWholeSizeArraySection = false;
+    } else if (DKind == OMPD_target_update &&
+               SemaRef.getLangOpts().OpenMP >= 50) {
----------------
cchen wrote:
> @ABataev , I guess you're saying the condition should be `!AllowWholeSizeArraySection && DKind == OMPD_target_update && SemaRef.getLangOpts().OpenMP >= 50`?
No, what I want is to try to simplify the code. I see now why do you need this flag. I'm just thinking can we avoid adding this flag to the clause and save some mem space?


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