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

================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7487-7497
+      auto TNext = Next;
+      bool IsVarDerefAssoWithArray = false;
+      if (UO && UO->getOpcode() == UO_Deref)
+        for (; TNext != CE; TNext = std::next(TNext))
+          if (isa<OMPArraySectionExpr>(TNext->getAssociatedExpression()) ||
+              isa<MemberExpr>(TNext->getAssociatedExpression()) ||
+              isa<OMPArrayShapingExpr>(TNext->getAssociatedExpression()) ||
----------------
ABataev wrote:
> jyu2 wrote:
> > ABataev wrote:
> > > jyu2 wrote:
> > > > ABataev wrote:
> > > > > Why need a loop here? Can you somehow merge analysis for (*p) 
> > > > > expression with the pointer subscript analysis?
> > > > What about if you have three dereference pointers like (***a)[0:3]  or 
> > > > four pointers...
> > > Why you can't iterate through the required components just like for the 
> > > array subscrit expression?
> > Because currently, for unarray operator the map info is skipped following 
> > the rule:
> > 
> > bool IsNonDerefPointer = IsPointer && !UO && !BO && !IsNonContiguous;
> > 
> > So I need to check if it is dereference to array some how to not skip it.
> 1. Same problem in Sema too.
> 2. Can you try to fix it to avoid those loops?
Thanks.  I removed loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145093

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to