[Openmp-commits] [PATCH] D145093: Add map info for dereference pointer.
Jennifer Yu via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Mar 3 09:11:40 PST 2023
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
More information about the Openmp-commits
mailing list