[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield abandoned this revision. JonChesterfield added a comment. The diff doesn't look right here. I can't tell if that's a quirk of the phab gui or indicates a bad merge, going to recreate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-27 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 301038. JonChesterfield added a comment. - prefer weak, update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89994/new/ https://reviews.llvm.org/D89994 Files: clang/lib/CodeGen/CGOpenMPRuntimeG

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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, +

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-23 Thread Johannes Doerfert via Phabricator via cfe-commits
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, +

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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, +

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:4794 CGM.getModule(), LLVMStaticTy, - /*isConstant=*/false, llvm::GlobalValue::CommonLinkage, - llvm::Constant::getNullValue(LLVMStaticTy), + /*isCons

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D89994#2348656 , @ABataev wrote: > In D89994#2348655 , @JonChesterfield > wrote: > >> The nvptx back end accepts common + zero + shared, but not common + undef + >> shared. I th

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D89994#2348655 , @JonChesterfield wrote: > The nvptx back end accepts common + zero + shared, but not common + undef + > shared. I think weak_odr is conceptually right here, but given the warning > that nvlink doesn't support

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. The nvptx back end accepts common + zero + shared, but not common + undef + shared. I think weak_odr is conceptually right here, but given the warning that nvlink doesn't support weak symbols, internal also seems fine. Can someone see an advantage to weak over i

[PATCH] D89994: [libomptarget][nvptx] Undef, internal shared variables

2020-10-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. JonChesterfield added reviewers: jdoerfert, ABataev, grokos, tianshilei1992, ye-luo. Herald added a project: clang. Herald added a subscriber: cfe-commits. JonChesterfield requested review of this revision. [libomptarget][nvptx] Undef, internal shared variab