[llvm] [AMDGPU][Verifier] Mark calls to entry functions as invalid in the IR verifier (PR #134910)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 03:08:47 PDT 2025
================
@@ -290,6 +290,26 @@ namespace CallingConv {
} // end namespace CallingConv
+/// \return true if the calling convention allows the function to be called
+/// directly or indirectly via a call-like instruction.
+constexpr bool isCallableCC(CallingConv::ID CC) {
+ switch (CC) {
+ case CallingConv::AMDGPU_CS_Chain:
+ case CallingConv::AMDGPU_CS_ChainPreserve:
+ case CallingConv::AMDGPU_CS:
+ case CallingConv::AMDGPU_ES:
+ case CallingConv::AMDGPU_GS:
+ case CallingConv::AMDGPU_HS:
+ case CallingConv::AMDGPU_KERNEL:
+ case CallingConv::AMDGPU_LS:
+ case CallingConv::AMDGPU_PS:
+ case CallingConv::AMDGPU_VS:
+ return false;
----------------
arsenm wrote:
"– No function can be targeted by both an OpEntryPoint instruction and an OpFunctionCall instruction."
https://github.com/llvm/llvm-project/pull/134910
More information about the llvm-commits
mailing list