[clang] 923b56e - [NFC] Add a TODO comment to apply nounwind attribute in all GPU modes.
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 6 06:20:57 PDT 2022
Author: Alexey Bader
Date: 2022-07-06T06:20:09-07:00
New Revision: 923b56e7ca96e03cedcb0e3a5df5c05e8e975a38
URL: https://github.com/llvm/llvm-project/commit/923b56e7ca96e03cedcb0e3a5df5c05e8e975a38
DIFF: https://github.com/llvm/llvm-project/commit/923b56e7ca96e03cedcb0e3a5df5c05e8e975a38.diff
LOG: [NFC] Add a TODO comment to apply nounwind attribute in all GPU modes.
Added:
Modified:
clang/lib/CodeGen/CGCall.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 4e26c35c6342..104a30dd6b25 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);
More information about the cfe-commits
mailing list