[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-05-07 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added a comment. In https://reviews.llvm.org/D44435#1088019, @tra wrote: > Perhaps we should take a step back and consider whether this is the right > approach to solve your problem. > > If I understand it correctly, the real issue is that you repeatedly recompile > the same module

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-05-09 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added a comment. Okay, I will close the request and thank you very much for your help and your hints. https://reviews.llvm.org/D44435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-13 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig created this revision. SimeonEhrig added reviewers: karies, v.g.vassilev, rsmith, rjmccall. This allows multi-module / incremental compilation environments to have unique global CUDA constructor and destructor function names. Repository: rC Clang https://reviews.llvm.org/D44435

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-13 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig updated this revision to Diff 138224. SimeonEhrig added a comment. change comment of the example function for TEST(IncrementalProcessing, EmitCUDAGlobalInitFunc) Repository: rC Clang https://reviews.llvm.org/D44435 Files: lib/CodeGen/CGCUDANV.cpp

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-14 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig marked an inline comment as done. SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:281 + // get name from the module to generate unique ctor name for every module + SmallString<128> ModuleName rjmccall wrote: > Please

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-15 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: unittests/CodeGen/IncrementalProcessingTest.cpp:176-178 + +// In CUDA incremental processing, a CUDA ctor or dtor will be generated for +// every statement if a fatbinary file exists. tra wrote: > SimeonEhrig

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-18 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig updated this revision to Diff 142921. SimeonEhrig added a comment. Thank you everyone for your review comments! We addressed the inline comments and improved the description of the change set for clarity and context. Tests are updated as well. This now implements the same fix as

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-18 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig marked 2 inline comments as done. SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:358 + if (ModuleName.empty()) +ModuleName = ""; + rjmccall wrote: > This doesn't actually seem more useful than the empty string. We

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-20 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig updated this revision to Diff 143246. SimeonEhrig added a comment. Add full context with -U99 to diff. https://reviews.llvm.org/D44435 Files: lib/CodeGen/CGCUDANV.cpp unittests/CodeGen/IncrementalProcessingTest.cpp Index: unittests/CodeGen/IncrementalProcessingTest.cpp

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-20 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:287 +CtorSuffix.append("_"); +CtorSuffix.append(ModuleName); + } tra wrote: > There is a general problem with this approach. File name can contain the > characters that PTX does

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-25 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:287 +CtorSuffix.append("_"); +CtorSuffix.append(ModuleName); + } tra wrote: > SimeonEhrig wrote: > > tra wrote: > > > There is a general problem with this approach. File name can

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-24 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig updated this revision to Diff 143706. SimeonEhrig added a comment. Add a comment, which declares the need of a unique ctor/dotr name. https://reviews.llvm.org/D44435 Files: lib/CodeGen/CGCUDANV.cpp unittests/CodeGen/IncrementalProcessingTest.cpp Index:

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-20 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: unittests/CodeGen/IncrementalProcessingTest.cpp:176-178 + +// In CUDA incremental processing, a CUDA ctor or dtor will be generated for +// every statement if a fatbinary file exists. tra wrote: > SimeonEhrig

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-16 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: unittests/CodeGen/IncrementalProcessingTest.cpp:176-178 + +// In CUDA incremental processing, a CUDA ctor or dtor will be generated for +// every statement if a fatbinary file exists. tra wrote: > SimeonEhrig

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-04-04 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: clang/tools/clang-repl/ClangRepl.cpp:135 +std::move(CI), std::move(DeviceCI), OffloadArch, +"/tmp/clang-repl.fatbin")); + v.g.vassilev wrote: > To cover the case where platforms have no `/tmp` we

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-04-11 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added a comment. Except using an in-memory solution for generated fatbin code, the code looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146389/new/ https://reviews.llvm.org/D146389

[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl

2023-04-28 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added a comment. In D146389#4292984 , @tra wrote: > lib/CodeGen changes look OK to me. I can confirm the code change in CodeGen works as expected. `clang-repl` does not generate temporary files anymore, if a CUDA kernel is compiled.