TRI = &TII->getRegisterInfo();
SkipThreshold = SkipThresholdFlag;
- SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>();
-
bool HaveKill = false;
- bool NeedFlat = false;
unsigned Depth = 0;
MachineFunction::iterator NextBB;
MachineInstr &MI = *I;
- // Flat uses m0 in case it needs to access LDS.
- if (TII->isFLAT(MI))
- NeedFlat = true;
-
switch (MI.getOpcode()) {
default: break;
case AMDGPU::SI_IF:
}
}
}
-
- if (NeedFlat && MFI->isKernel()) {
- // TODO: What to use with function calls?
- // We will need to Initialize the flat scratch register pair.
- if (NeedFlat)
- MFI->setHasFlatInstructions(true);
- }
-
return true;
}
HasSpilledSGPRs(false),
HasSpilledVGPRs(false),
HasNonSpillStackObjects(false),
- HasFlatInstructions(false),
NumSpilledSGPRs(0),
NumSpilledVGPRs(0),
PrivateSegmentBuffer(false),
bool HasSpilledSGPRs;
bool HasSpilledVGPRs;
bool HasNonSpillStackObjects;
- bool HasFlatInstructions;
unsigned NumSpilledSGPRs;
unsigned NumSpilledVGPRs;
HasNonSpillStackObjects = StackObject;
}
- bool hasFlatInstructions() const {
- return HasFlatInstructions;
- }
-
- void setHasFlatInstructions(bool UseFlat = true) {
- HasFlatInstructions = UseFlat;
- }
-
unsigned getNumSpilledSGPRs() const {
return NumSpilledSGPRs;
}