[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-04 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283272: [CUDA] Mark device functions as nounwind. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25166?vs=73579&id=73581#toc Repository: rL LLVM https://reviews.llvm.org/D2

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-04 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73579. jlebar marked an inline comment as done. jlebar added a comment. Update tests. https://reviews.llvm.org/D25166 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGException.cpp clang/test/CodeGenCUDA/convergent.cu clang/test/CodeGenCUDA/de

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-04 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a reviewer: rnk. rnk added a comment. This revision is now accepted and ready to land. lgtm > nothrow.cu:16 > +// DEVICE: define void @_Z3foov() [[DEVICE_ATTR:#[0-9]+]] > +__device__ void foo() { f(); } > + I would check for `call void @_Z1fv` here, and ma

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-04 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 73577. jlebar added a comment. Move everything into codegen. https://reviews.llvm.org/D25166 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGException.cpp clang/test/CodeGenCUDA/convergent.cu clang/test/CodeGenCUDA/device-var-init.cu clang/

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D25166#559168, @jlebar wrote: > > Also, take a look at CodeGenFunction::getInvokeDestImpl(). I think you > > should add some checks in there to return nullptr if we're doing a > > device-side CUDA compilation. That's a much more direct way to ens

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-03 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D25166#559117, @rnk wrote: > It feels like the right thing is to disable EH in device side compilation, > but obviously that won't work because it would reject try/throw in host code. Exactly. > I think instead of doing that, we should make

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-03 Thread Reid Kleckner via cfe-commits
rnk added a comment. It feels like the right thing is to disable EH in device side compilation, but obviously that won't work because it would reject try/throw in host code. I think instead of doing that, we should make sure that CUDA diagnoses try / catch / throw in device functions, and then

[PATCH] D25166: [CUDA] Mark device functions as nounwind.

2016-10-02 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. This prevents clang from emitting 'invoke's and catch statements. Things previously mostly worked thanks to TryToMarkNoThrow() in CodeGenFunction. But this is not a proper IPO, and it doesn't prop