summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index fb6d4f8841ab..c305bc20e40d 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -26,9 +26,9 @@ namespace llvm {
class MachineFrameInfo;
class MachineFunction;
-class TargetRegisterClass;
class SIMachineFunctionInfo;
class SIRegisterInfo;
+class TargetRegisterClass;
class AMDGPUPseudoSourceValue : public PseudoSourceValue {
public:
@@ -433,6 +433,8 @@ private:
// Current recorded maximum possible occupancy.
unsigned Occupancy;
+ mutable Optional<bool> UsesAGPRs;
+
MCPhysReg getNextUserSGPR() const;
MCPhysReg getNextSystemSGPR() const;
@@ -946,6 +948,9 @@ public:
Occupancy = Limit;
limitOccupancy(MF);
}
+
+ // \returns true if a function needs or may need AGPRs.
+ bool usesAGPRs(const MachineFunction &MF) const;
};
} // end namespace llvm