aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Archive.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-01-14 16:21:24 -0500
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-01-17 10:04:42 -0500
commit0b1140e883527101599e09462d8aa353cdec1903 (patch)
tree4158b14b01489f4d275e4e70270b86fd6ff21576 /llvm/lib/Object/Archive.cpp
parentc3a74183a52f5cecc19f947187921866665ef279 (diff)
downloadllvm-0b1140e883527101599e09462d8aa353cdec1903.zip
llvm-0b1140e883527101599e09462d8aa353cdec1903.tar.gz
llvm-0b1140e883527101599e09462d8aa353cdec1903.tar.bz2
AMDGPU: Correct getMaxNumSGPR treatment of flat_scratch
This was approximating the entry point logic for flat_scratch_init, which is not really the point. We need to account for whether we need to reserve the SGPR pair used for flat_scratch, not whether we needed the initialization kernel argument. If this was an arbitrary function, we would end up over-reporting the number of potentially free SGPRs. The logic for architected flat scratch also only applies to the initialization in the kernel, not the reserved registers at the end. Avoids compile failures in a future patch from allocating more SGPRs than the subtarget supports.
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
0 files changed, 0 insertions, 0 deletions