[clang] [clang][CUDA] Add 'noconvergent' function and statement attribute (PR #100637)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 09:35:19 PDT 2024


================
@@ -5636,9 +5639,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
     Attrs =
         Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::AlwaysInline);
 
-  // Add call-site convergent attribute if exists.
-  if (InConvergentAttributedStmt)
-    Attrs = Attrs.addFnAttribute(getLLVMContext(), llvm::Attribute::Convergent);
+  // Remove call-site convergent attribute if requested.
+  if (InNoConvergentAttributedStmt)
+    Attrs =
+        Attrs.removeFnAttribute(getLLVMContext(), llvm::Attribute::Convergent);
----------------
arsenm wrote:

Is it easy to avoid adding this in the first place? 

https://github.com/llvm/llvm-project/pull/100637


More information about the cfe-commits mailing list