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
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
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
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/
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
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
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
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