[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3717208 , @jhuber6 wrote: > In D129694#3717166 , @ssquare08 > wrote: > >> The OpenMP kernel names you mentioned are also generated separately by the >> host and the device.

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 marked an inline comment as not done. ssquare08 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9439 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + // Make sure any variable with OpenMP declare target is visible to r

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3717008 , @ssquare08 wrote: > In D129694#3708297 , @jhuber6 wrote: > >> In D129694#3708214 , @ssquare08 >> wrote: >> >>> If that's t

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3708297 , @jhuber6 wrote: > In D129694#3708214 , @ssquare08 > wrote: > >> If that's the preference I can make changes as suggested. You mentioned CUDA >> and HIP mangle the

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-08 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9439 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + // Make sure any variable with OpenMP declare target is visible to runtime + // except for those with hidden visibi

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-08 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3685207 , @jhuber6 wrote: > I still think we shouldn't bother making all the noise containing the > original name. Just mangle it and treat it like every other declare target > variable without introducing any extra

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-07-26 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10797 +Out< ssquare08 wrote: > > jhuber6 wrote: > > > `CGM.printPostfixForExternalizedDecl` should ideally give the same output > > > on the host and device, but it's somewhat limited sinc

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-07-26 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added inline comments. Comment at: clang/test/OpenMP/declare_target_only_one_side_compilation.cpp:61 // DEVICE-DAG: @G1 = {{.*}}global i32 0, align 4 -// DEVICE-DAG: @_ZL2G2 = internal {{.*}}global i32 0, align 4 +// DEVICE-DAG: @_ZL2G2 = {{.*}}global i32 0, align 4 /

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-07-26 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 updated this revision to Diff 447901. ssquare08 added a comment. Herald added a project: OpenMP. Herald added a subscriber: openmp-commits. Adding a test and fixing This adds a new runtime test and also address some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-07-13 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10790 Flags = OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryTo; -VarName = CGM.getMangledName(VD); +// We don't need to mangle the host side of declare target global variables b

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-07-13 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 created this revision. ssquare08 added a reviewer: jhuber6. Herald added subscribers: mattd, asavonic, guansong, yaxunl. Herald added a project: All. ssquare08 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald ad

[PATCH] D125669: Adding support for target in_reduction

2022-06-23 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D125669#3604452 , @ABataev wrote: > In D125669#3604302 , @RitanyaB > wrote: > >> In D125669#3599134 , @ABataev >> wrote: >> >>> What about