aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorAlexey Bader <alexey.bader@intel.com>2022-07-06 06:15:17 -0700
committerAlexey Bader <alexey.bader@intel.com>2022-07-06 06:20:09 -0700
commit923b56e7ca96e03cedcb0e3a5df5c05e8e975a38 (patch)
tree6ffdd375dd909a038b01ead790fb8346c1a93fa5 /clang/lib/CodeGen/CGCall.cpp
parent7d8e2742d958468b900532f1e44610b9b0b29f5e (diff)
downloadllvm-923b56e7ca96e03cedcb0e3a5df5c05e8e975a38.zip
llvm-923b56e7ca96e03cedcb0e3a5df5c05e8e975a38.tar.gz
llvm-923b56e7ca96e03cedcb0e3a5df5c05e8e975a38.tar.bz2
[NFC] Add a TODO comment to apply nounwind attribute in all GPU modes.
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 4e26c35..104a30d 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1931,6 +1931,9 @@ void CodeGenModule::getDefaultFunctionAttributes(StringRef Name,
FuncAttrs.addAttribute(llvm::Attribute::Convergent);
}
+ // TODO: NoUnwind attribute should be added for other GPU modes OpenCL, HIP,
+ // SYCL, OpenMP offload. AFAIK, none of them support exceptions in device
+ // code.
if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) {
// Exceptions aren't supported in CUDA device code.
FuncAttrs.addAttribute(llvm::Attribute::NoUnwind);