[llvm] [AMDGPU] Remove duplicated/confusing helpers. NFCI (PR #142598)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 07:44:18 PDT 2025
================
@@ -2185,8 +2185,16 @@ bool isChainCC(CallingConv::ID CC) {
}
}
-bool isKernelCC(const Function *Func) {
- return AMDGPU::isModuleEntryFunctionCC(Func->getCallingConv());
+bool canGuaranteeTCO(CallingConv::ID CC) { return CC == CallingConv::Fast; }
+
+bool mayTailCallThisCC(CallingConv::ID CC) {
+ switch (CC) {
+ case CallingConv::C:
+ case CallingConv::AMDGPU_Gfx:
+ return true;
+ default:
+ return canGuaranteeTCO(CC);
+ }
----------------
arsenm wrote:
Might as well keep these in the header
https://github.com/llvm/llvm-project/pull/142598
More information about the llvm-commits
mailing list