[PATCH] D145093: Add map info for dereference pointer.

Jennifer Yu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 3 14:57:28 PST 2023


jyu2 marked an inline comment as done.
jyu2 added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493
+      if (UO && UO->getOpcode() == UO_Deref)
+        if (isa<OMPArraySectionExpr>(Last->getAssociatedExpression()) ||
+            isa<OMPArrayShapingExpr>(Last->getAssociatedExpression()) ||
+            isa<ArraySubscriptExpr>(Last->getAssociatedExpression()))
+          IsVarDerefAssoWithArray = true;
----------------
ABataev wrote:
> What if we have something like:
> ```
> typedef int (T)[3];
> 
> T** p;
> map(**p)
> ```
> ? Shall it work? I.e. mapping of the whole array by dereferening the pointer to the array.
No, it is not work currently.  What about *(*(p+a)+b)...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145093



More information about the cfe-commits mailing list