[llvm] [NFC] Remove mention of nonexistent SPIR_FUNC restriction. (PR #148625)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 14 06:02:34 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Harald van Dijk (hvdijk)

<details>
<summary>Changes</summary>

The documentation for SPIR_FUNC mentions that functions can only call SPIR_FUNC and SPIR_KERNEL functions, but there is no verification of this and we rely on being able to call functions with the default calling convention at least for intrinsics.

---
Full diff: https://github.com/llvm/llvm-project/pull/148625.diff


1 Files Affected:

- (modified) llvm/include/llvm/IR/CallingConv.h (+4-5) 


``````````diff
diff --git a/llvm/include/llvm/IR/CallingConv.h b/llvm/include/llvm/IR/CallingConv.h
index d68491eb5535c..d9c67d9f227c1 100644
--- a/llvm/include/llvm/IR/CallingConv.h
+++ b/llvm/include/llvm/IR/CallingConv.h
@@ -130,11 +130,10 @@ namespace CallingConv {
 
     /// Used for SPIR non-kernel device functions. No lowering or expansion of
     /// arguments. Structures are passed as a pointer to a struct with the
-    /// byval attribute. Functions can only call SPIR_FUNC and SPIR_KERNEL
-    /// functions. Functions can only have zero or one return values. Variable
-    /// arguments are not allowed, except for printf. How arguments/return
-    /// values are lowered are not specified. Functions are only visible to the
-    /// devices.
+    /// byval attribute. Functions can only have zero or one return values.
+    /// Variable arguments are not allowed, except for printf. How
+    /// arguments/return values are lowered are not specified. Functions are
+    /// only visible to the devices.
     SPIR_FUNC = 75,
 
     /// Used for SPIR kernel functions. Inherits the restrictions of SPIR_FUNC,

``````````

</details>


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


More information about the llvm-commits mailing list