AMDGPU: Make MFI fields private

llvm-svn: 300596
This commit is contained in:
Matt Arsenault 2017-04-18 20:59:40 +00:00
parent 922940b627
commit 161e2b4223
2 changed files with 8 additions and 6 deletions

View File

@ -512,10 +512,10 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
AMDGPU::IsaInfo::FIXED_NUM_SGPRS_FOR_INIT_BUG;
}
if (MFI->NumUserSGPRs > STM.getMaxNumUserSGPRs()) {
if (MFI->getNumUserSGPRs() > STM.getMaxNumUserSGPRs()) {
LLVMContext &Ctx = MF.getFunction()->getContext();
DiagnosticInfoResourceLimit Diag(*MF.getFunction(), "user SGPRs",
MFI->NumUserSGPRs, DS_Error);
MFI->getNumUserSGPRs(), DS_Error);
Ctx.diagnose(Diag);
}
@ -572,7 +572,7 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
}
unsigned LDSSpillSize =
MFI->LDSWaveSpillSize * MFI->getMaxFlatWorkGroupSize();
MFI->getLDSWaveSpillSize() * MFI->getMaxFlatWorkGroupSize();
ProgInfo.LDSSize = MFI->getLDSSize() + LDSSpillSize;
ProgInfo.LDSBlocks =

View File

@ -133,14 +133,12 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction {
AMDGPUBufferPseudoSourceValue BufferPSV;
AMDGPUImagePseudoSourceValue ImagePSV;
public:
// FIXME: Make private
private:
unsigned LDSWaveSpillSize;
unsigned ScratchOffsetReg;
unsigned NumUserSGPRs;
unsigned NumSystemSGPRs;
private:
bool HasSpilledSGPRs;
bool HasSpilledVGPRs;
bool HasNonSpillStackObjects;
@ -535,6 +533,10 @@ public:
llvm_unreachable("unexpected dimension");
}
unsigned getLDSWaveSpillSize() const {
return LDSWaveSpillSize;
}
const AMDGPUBufferPseudoSourceValue *getBufferPSV() const {
return &BufferPSV;
}