ABataev 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)) { ---------------- doru1004 wrote: > 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? Make isDelayedVariableLengthDecl virtual in base OpenMPRuntime and make it return false by default, and true in base implementation for GPU. This should fix the problem, I hope Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits