[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause
Chi Chun Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 24 14:20:34 PST 2020
cchen marked an inline comment as done.
cchen added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15712
+ const std::string RTS = RT->getCanonicalTypeInternal().getAsString();
+ auto CntLayer = [](char c) { return c == '*' || c == '['; };
+ size_t LLayerCnt = std::count_if(LTS.begin(), LTS.end(), CntLayer);
----------------
ABataev wrote:
> cchen wrote:
> > ABataev wrote:
> > > Again, bad idea to count this stuff.
> > Will it be better if just check if the subtree is an offset? So that we only need to check if it does not have any decorator in type?
> What do you mean? Exclude, say, RHS or LHS from the analysis, if it is a complex expression and you can use another part as a base? That's worth trying, at least.
Generally yes, but the current implementation was the opposite way: visit the subtree with the same type as root (binop), if found, then we just visit it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75077/new/
https://reviews.llvm.org/D75077
More information about the cfe-commits
mailing list