mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
R600/SI: Implement VGPR register spilling for compute at -O0 v3
VGPRs are spilled to LDS. This still needs more testing, but
we need to at least enable it at -O0, because the fast register
allocator spills all registers that are live at the end of blocks
and without this some future commits will break the
flat-address-space.ll test.
v2: Only calculate thread id once
v3: Move insertion of spill instructions to
SIRegisterInfo::eliminateFrameIndex()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218348 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#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 {
|
||||
@@ -44,6 +48,12 @@ public:
|
||||
unsigned PSInputAddr;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user