Skip to content

Commit 55d744e

Browse files
authored
[AMDGPU] Move AMDGPUMemoryUtils out of Utils. NFC. (#104930)
It is only used by CodeGen so does not need to be shared with the assembler/disassembler.
1 parent 1c3955f commit 55d744e

8 files changed

+9
-8
lines changed

llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#include "AMDGPU.h"
16+
#include "AMDGPUMemoryUtils.h"
1617
#include "Utils/AMDGPUBaseInfo.h"
17-
#include "Utils/AMDGPUMemoryUtils.h"
1818
#include "llvm/Analysis/AliasAnalysis.h"
1919
#include "llvm/Analysis/MemorySSA.h"
2020
#include "llvm/Analysis/UniformityAnalysis.h"

llvm/lib/Target/AMDGPU/AMDGPUAsanInstrumentation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPU_ASAN_INSTRUMENTATION_H
1111

1212
#include "AMDGPU.h"
13+
#include "AMDGPUMemoryUtils.h"
1314
#include "Utils/AMDGPUBaseInfo.h"
14-
#include "Utils/AMDGPUMemoryUtils.h"
1515
#include "llvm/ADT/SetOperations.h"
1616
#include "llvm/ADT/StringExtras.h"
1717
#include "llvm/ADT/StringMap.h"

llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@
177177
//===----------------------------------------------------------------------===//
178178

179179
#include "AMDGPU.h"
180+
#include "AMDGPUMemoryUtils.h"
180181
#include "AMDGPUTargetMachine.h"
181182
#include "Utils/AMDGPUBaseInfo.h"
182-
#include "Utils/AMDGPUMemoryUtils.h"
183183
#include "llvm/ADT/BitVector.h"
184184
#include "llvm/ADT/DenseMap.h"
185185
#include "llvm/ADT/DenseSet.h"

llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp renamed to llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "AMDGPUMemoryUtils.h"
1010
#include "AMDGPU.h"
11-
#include "AMDGPUBaseInfo.h"
11+
#include "Utils/AMDGPUBaseInfo.h"
1212
#include "llvm/ADT/SetOperations.h"
1313
#include "llvm/ADT/SmallSet.h"
1414
#include "llvm/Analysis/AliasAnalysis.h"
@@ -205,7 +205,7 @@ LDSUsesInfoTy getTransitiveUsesOfLDS(const CallGraph &CG, Module &M) {
205205
}
206206

207207
// Verify that we fall into one of 2 cases:
208-
// - All variables are either absolute
208+
// - All variables are either absolute
209209
// or direct mapped dynamic LDS that is not lowered.
210210
// this is a re-run of the pass
211211
// so we don't have anything to do.
@@ -215,7 +215,8 @@ LDSUsesInfoTy getTransitiveUsesOfLDS(const CallGraph &CG, Module &M) {
215215
for (auto &[Fn, GVs] : Map) {
216216
for (auto *GV : GVs) {
217217
bool IsAbsolute = GV->isAbsoluteSymbolRef();
218-
bool IsDirectMapDynLDSGV = AMDGPU::isDynamicLDS(*GV) && DirectMapKernel.contains(Fn);
218+
bool IsDirectMapDynLDSGV =
219+
AMDGPU::isDynamicLDS(*GV) && DirectMapKernel.contains(Fn);
219220
if (IsDirectMapDynLDSGV)
220221
continue;
221222
if (HasAbsoluteGVs.has_value()) {

llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//===----------------------------------------------------------------------===//
1717

1818
#include "AMDGPU.h"
19-
#include "Utils/AMDGPUMemoryUtils.h"
19+
#include "AMDGPUMemoryUtils.h"
2020
#include "llvm/ADT/SmallVector.h"
2121
#include "llvm/Analysis/AliasAnalysis.h"
2222
#include "llvm/Analysis/MemorySSA.h"

llvm/lib/Target/AMDGPU/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ add_llvm_target(AMDGPUCodeGen
7979
AMDGPUMachineModuleInfo.cpp
8080
AMDGPUMacroFusion.cpp
8181
AMDGPUMCInstLower.cpp
82+
AMDGPUMemoryUtils.cpp
8283
AMDGPUIGroupLP.cpp
8384
AMDGPUInsertSingleUseVDST.cpp
8485
AMDGPUMarkLastScratchLoad.cpp

llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ add_llvm_component_library(LLVMAMDGPUUtils
22
AMDGPUAsmUtils.cpp
33
AMDGPUBaseInfo.cpp
44
AMDGPUDelayedMCExpr.cpp
5-
AMDGPUMemoryUtils.cpp
65
AMDGPUPALMetadata.cpp
76
AMDKernelCodeTUtils.cpp
87

0 commit comments

Comments
 (0)