[PATCH] D28760: [AMDGPU] Add target information that is required by static analyzer tool to metadata
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 17:25:36 PST 2017
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:1157-1163
unsigned SIRegisterInfo::getTotalNumSGPRs(const SISubtarget &ST) const {
- if (ST.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
- return 800;
- return 512;
+ return AMDGPU::getTotalNumSGPRs(ST.getFeatureBits());
}
unsigned SIRegisterInfo::getNumAddressableSGPRs(const SISubtarget &ST) const {
- if (ST.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
- return 102;
- return 104;
+ return AMDGPU::getNumAddressableSGPRs(ST.getFeatureBits());
}
----------------
Can these be moved to the header now?
================
Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:94
+ if (Features.test(FeatureSGPRInitBug))
+ return 96; // SISubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG.
+
----------------
kzhuravl wrote:
> We can't really include AMDGPUSubtarget.h here. Should FIXED_SGPR_COUNT_FOR_INIT_BUG definition be moved to SIDefines.h?
Yes
https://reviews.llvm.org/D28760
More information about the llvm-commits
mailing list