[llvm] 56202c5 - Revert "[amdgpu][lds] Use the same isKernel predicate consistently"
Jon Chesterfield via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 08:54:55 PST 2022
Author: Jon Chesterfield
Date: 2022-11-09T16:54:20Z
New Revision: 56202c51d4473617b4d19205dfa90fd5a9098153
URL: https://github.com/llvm/llvm-project/commit/56202c51d4473617b4d19205dfa90fd5a9098153
DIFF: https://github.com/llvm/llvm-project/commit/56202c51d4473617b4d19205dfa90fd5a9098153.diff
LOG: Revert "[amdgpu][lds] Use the same isKernel predicate consistently"
Looks like this composed poorly with a nominally independent patch, will fix
This reverts commit 0ba0398517778514eb44cb7ba9bf9d4d20a856e0.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index 81222a25ba8f5..be5ac67f9e37d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -259,7 +259,7 @@ class AMDGPULowerModuleLDS : public ModulePass {
IRBuilder<> Builder(Ctx);
for (Function &Func : M.functions()) {
- if (!Func.isDeclaration() && AMDGPU::isKernel(Func.getCallingConv())) {
+ if (!Func.isDeclaration() && AMDGPU::isKernelCC(&Func)) {
const CallGraphNode *N = CG[&Func];
const bool CalleesRequireModuleLDS = N->size() > 0;
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
index 65722ddfd6325..b1418253fd136 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
@@ -41,7 +41,7 @@ static bool shouldLowerLDSToStruct(const GlobalVariable &GV,
SmallPtrSet<const User *, 8> Visited;
SmallVector<const User *, 16> Stack(GV.users());
- assert(!F || isKernel(F->getCallingConv()));
+ assert(!F || isKernelCC(F));
while (!Stack.empty()) {
const User *V = Stack.pop_back_val();
@@ -62,7 +62,7 @@ static bool shouldLowerLDSToStruct(const GlobalVariable &GV,
} else if (!F) {
// For module LDS lowering, lowering is required if the user instruction
// is from non-kernel function.
- Ret |= !isKernel(UF->getCallingConv());
+ Ret |= !isKernelCC(UF);
}
continue;
}
More information about the llvm-commits
mailing list