diff options
author | Stephen Hines <srhines@google.com> | 2014-12-04 19:51:48 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-04 19:51:48 +0000 |
commit | a21bbdfad461e957fa42ac9d6860ddc9de2da3e9 (patch) | |
tree | 8d32ff2094b47e15a8def30d62fd7dee6e009de3 /lib/Target/R600/SIMachineFunctionInfo.h | |
parent | 6b8c6a5088c221af2b25065b8b6b8b0fec8a116f (diff) | |
parent | 876d6995443e99d13696f3941c3a789a4daa7c7a (diff) | |
download | external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.zip external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.gz external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.bz2 |
am 876d6995: Merge "Update aosp/master LLVM for rebase to r222494."
* commit '876d6995443e99d13696f3941c3a789a4daa7c7a':
Update aosp/master LLVM for rebase to r222494.
Diffstat (limited to 'lib/Target/R600/SIMachineFunctionInfo.h')
-rw-r--r-- | lib/Target/R600/SIMachineFunctionInfo.h | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/lib/Target/R600/SIMachineFunctionInfo.h b/lib/Target/R600/SIMachineFunctionInfo.h index 96e619b..6bb8f9d 100644 --- a/lib/Target/R600/SIMachineFunctionInfo.h +++ b/lib/Target/R600/SIMachineFunctionInfo.h @@ -12,10 +12,11 @@ //===----------------------------------------------------------------------===// -#ifndef SIMACHINEFUNCTIONINFO_H_ -#define SIMACHINEFUNCTIONINFO_H_ +#ifndef LLVM_LIB_TARGET_R600_SIMACHINEFUNCTIONINFO_H +#define LLVM_LIB_TARGET_R600_SIMACHINEFUNCTIONINFO_H #include "AMDGPUMachineFunction.h" +#include "SIRegisterInfo.h" #include <map> namespace llvm { @@ -26,6 +27,9 @@ class MachineRegisterInfo; /// tells the hardware which interpolation parameters to load. class SIMachineFunctionInfo : public AMDGPUMachineFunction { void anchor() override; + + unsigned TIDReg; + public: struct SpilledReg { @@ -36,32 +40,23 @@ public: bool hasLane() { return Lane != -1;} }; - struct RegSpillTracker { - private: - unsigned CurrentLane; - std::map<unsigned, SpilledReg> SpilledRegisters; - public: - unsigned LaneVGPR; - RegSpillTracker() : CurrentLane(0), SpilledRegisters(), LaneVGPR(0) { } - /// \p NumRegs The number of consecutive registers what need to be spilled. - /// This function will ensure that all registers are stored in - /// the same VGPR. - /// \returns The lane to be used for storing the first register. - unsigned reserveLanes(MachineRegisterInfo &MRI, MachineFunction *MF, - unsigned NumRegs = 1); - void addSpilledReg(unsigned FrameIndex, unsigned Reg, int Lane = -1); - const SpilledReg& getSpilledReg(unsigned FrameIndex); - bool programSpillsRegisters() { return !SpilledRegisters.empty(); } - }; - // SIMachineFunctionInfo definition SIMachineFunctionInfo(const MachineFunction &MF); + SpilledReg getSpilledReg(MachineFunction *MF, unsigned FrameIndex, + unsigned SubIdx); unsigned PSInputAddr; - struct RegSpillTracker SpillTracker; + unsigned NumUserSGPRs; + std::map<unsigned, unsigned> LaneVGPRs; + unsigned LDSWaveSpillSize; + bool hasCalculatedTID() const { return TIDReg != AMDGPU::NoRegister; }; + unsigned getTIDReg() const { return TIDReg; }; + void setTIDReg(unsigned Reg) { TIDReg = Reg; } + + unsigned getMaximumWorkGroupSize(const MachineFunction &MF) const; }; } // End namespace llvm -#endif //_SIMACHINEFUNCTIONINFO_H_ +#endif |