[llvm] 7b9ab06 - [amdgpu][nfc] Delete dead code in LowerModuleLDS
Jon Chesterfield via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 16:46:02 PST 2021
Author: Jon Chesterfield
Date: 2021-12-10T00:43:46Z
New Revision: 7b9ab06d10a6a989f76e6c5ecf89d906f838fe7d
URL: https://github.com/llvm/llvm-project/commit/7b9ab06d10a6a989f76e6c5ecf89d906f838fe7d
DIFF: https://github.com/llvm/llvm-project/commit/7b9ab06d10a6a989f76e6c5ecf89d906f838fe7d.diff
LOG: [amdgpu][nfc] Delete dead code in LowerModuleLDS
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index 894f341bb0851..bb15d0e7b2b59 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -55,20 +55,6 @@ static cl::opt<bool> SuperAlignLDSGlobals(
namespace {
-SmallPtrSet<GlobalValue *, 32> getUsedList(Module &M) {
- SmallPtrSet<GlobalValue *, 32> UsedList;
-
- SmallVector<GlobalValue *, 32> TmpVec;
- collectUsedGlobalVariables(M, TmpVec, true);
- UsedList.insert(TmpVec.begin(), TmpVec.end());
-
- TmpVec.clear();
- collectUsedGlobalVariables(M, TmpVec, false);
- UsedList.insert(TmpVec.begin(), TmpVec.end());
-
- return UsedList;
-}
-
class AMDGPULowerModuleLDS : public ModulePass {
static void removeFromUsedList(Module &M, StringRef Name,
@@ -165,8 +151,6 @@ class AMDGPULowerModuleLDS : public ModulePass {
}
bool runOnModule(Module &M) override {
- UsedList = getUsedList(M);
-
bool Changed = processUsedLDS(M);
for (Function &F : M.functions()) {
@@ -179,7 +163,6 @@ class AMDGPULowerModuleLDS : public ModulePass {
Changed |= processUsedLDS(M, &F);
}
- UsedList.clear();
return Changed;
}
More information about the llvm-commits
mailing list