[llvm] 4902885 - [AMDGPU] Request module used variables from LDS lowering as internal
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Thu May 20 20:56:01 PDT 2021
Author: Stanislav Mekhanoshin
Date: 2021-05-20T20:55:47-07:00
New Revision: 49028858637946ce8c00f12e41138b5ed7783276
URL: https://github.com/llvm/llvm-project/commit/49028858637946ce8c00f12e41138b5ed7783276
DIFF: https://github.com/llvm/llvm-project/commit/49028858637946ce8c00f12e41138b5ed7783276.diff
LOG: [AMDGPU] Request module used variables from LDS lowering as internal
I do not see any practical difference but technically
used.* variables are internal and a call to getGlobalVariable
misses true as a second argument. NFC as far as I can tell.
Differential Revision: https://reviews.llvm.org/D102884
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 c608bef91360..b1950bf15c90 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -52,7 +52,7 @@ class AMDGPULowerModuleLDS : public ModulePass {
static void removeFromUsedList(Module &M, StringRef Name,
SmallPtrSetImpl<Constant *> &ToRemove) {
- GlobalVariable *GV = M.getGlobalVariable(Name);
+ GlobalVariable *GV = M.getNamedGlobal(Name);
if (!GV || ToRemove.empty()) {
return;
}
More information about the llvm-commits
mailing list