isKernelCC != isKernel(F->getCallingConv())
There's a test case (lower-kernel-lds.ll) that explicitly skips amdgpu_ps
so this change picks the isKernel predicate that continues to skip that
calling convention.
isKernel returns true for AMDGPU_KERNEL and SPIR_KERNEL. isKernelCC also
returns true for other calling conventions.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D136599
IRBuilder<> Builder(Ctx);
for (Function &Func : M.functions()) {
- if (!Func.isDeclaration() && AMDGPU::isKernelCC(&Func)) {
+ if (!Func.isDeclaration() && AMDGPU::isKernel(Func.getCallingConv())) {
const CallGraphNode *N = CG[&Func];
const bool CalleesRequireModuleLDS = N->size() > 0;
SmallPtrSet<const User *, 8> Visited;
SmallVector<const User *, 16> Stack(GV.users());
- assert(!F || isKernelCC(F));
+ assert(!F || isKernel(F->getCallingConv()));
while (!Stack.empty()) {
const User *V = Stack.pop_back_val();
} else if (!F) {
// For module LDS lowering, lowering is required if the user instruction
// is from non-kernel function.
- Ret |= !isKernelCC(UF);
+ Ret |= !isKernel(UF->getCallingConv());
}
continue;
}