[PATCH] D28760: [AMDGPU] Add target information that is required by static analyzer tool to metadata

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 01:04:32 PST 2017

kzhuravl added inline comments.

Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:94
+  if (Features.test(FeatureSGPRInitBug))
+    return 96; // SISubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG.
We can't really include AMDGPUSubtarget.h here. Should FIXED_SGPR_COUNT_FOR_INIT_BUG definition be moved to SIDefines.h?

Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:39-49
+/// \returns Total number of SGPRs supported by the subtarget.
+unsigned getTotalNumSGPRs(const FeatureBitset &Features);
+/// \returns Number of addressable SGPRs supported by the subtarget.
+unsigned getNumAddressableSGPRs(const FeatureBitset &Features);
+/// \returns Total number of VGPRs supported by the subtarget.
Is there a better place for these?


More information about the llvm-commits mailing list