jdoerfert added inline comments.
================ Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:2858 TransferMedium = new llvm::GlobalVariable( - M, Ty, /*isConstant=*/false, llvm::GlobalVariable::CommonLinkage, - llvm::Constant::getNullValue(Ty), TransferMediumName, + M, Ty, /*isConstant=*/false, llvm::GlobalVariable::InternalLinkage, + llvm::UndefValue::get(Ty), TransferMediumName, ---------------- ABataev wrote: > "Internalization" is not the best option, it increases mem pressure. Common > linkage is a better choice, allows to "squash" the same objects, defined in > different units. Make it arch dependable, maybe? > For NVPTX zero initialization is not a problem, it is resolved when PTX is > generated. FWIW, if we do not depend on the zero initialization, we should go with undef. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89994/new/ https://reviews.llvm.org/D89994 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits