[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs
Gheorghe-Teodor Bercea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 30 07:25:11 PDT 2023
doru1004 added inline comments.
================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1609
+ (CGM.getContext().getTargetInfo().getTriple().isAMDGPU() ||
+ CGM.getContext().getTargetInfo().getTriple().isNVPTX())) {
+ CGOpenMPRuntimeGPU &RT =
+ *(static_cast<CGOpenMPRuntimeGPU *>(&CGM.getOpenMPRuntime()));
+ if (RT.isDelayedVariableLengthDecl(*this, &D)) {
----------------
ABataev wrote:
> I think you can drop triple checks and rely completely on RT.isDelayedVariableLengthDecl(*this, &D) result here
I tried it but there is a lit test (which I cannot identify) that hangs when offloading to the host (I think) so it has to be an actual GPU. Any ideas?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153883/new/
https://reviews.llvm.org/D153883
More information about the cfe-commits
mailing list