[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-05 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334021: [CUDA][HIP] Do not emit type info when compiling for device (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D47694 Files: lib/CodeGen/CodeGenModule.cpp t

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. https://reviews.llvm.org/D47694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 149892. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D47694 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/device-vtable.cu Index: test/CodeGenCUDA/device-vtable.cu

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, I see, because you're worried that the host code might contain `dynamic_cast` or similar features which would complain if RTTI were disabled. `getLangOpts().CUDAIsDevice` implies `getLangOpts().CUDA`, so I think you can just check the former. Otherwise LGTM. htt

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D47694#1121037, @rjmccall wrote: > In https://reviews.llvm.org/D47694#1120375, @yaxunl wrote: > > > In https://reviews.llvm.org/D47694#1120367, @rjmccall wrote: > > > > > Why not just have the driver disable RTTI in the frontend invocation? > >

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47694#1120375, @yaxunl wrote: > In https://reviews.llvm.org/D47694#1120367, @rjmccall wrote: > > > Why not just have the driver disable RTTI in the frontend invocation? > > > CUDA/HIP uses single source for device and host. The host code may

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D47694#1120367, @rjmccall wrote: > Why not just have the driver disable RTTI in the frontend invocation? CUDA/HIP uses single source for device and host. The host code may depend on RTTI, e.g., an application may include some boost headers wh

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Why not just have the driver disable RTTI in the frontend invocation? https://reviews.llvm.org/D47694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47694: [CUDA][HIP] Do not emit type info when compiling for device

2018-06-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. CUDA/HIP does not support RTTI on device side, therefore there is no point of emitting type info when compiling for device. Emitting type info for device not only clutters the IR with useless global variables, but also causes un