summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-09 18:11:15 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-09 18:11:15 +0000
commit52a4d9b4297832a51a75cdb57d0015ffb1899a63 (patch)
tree5cda6b36e248d7455fb1786d7231855f59c6814d /llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
parent48d70cb4862050446de3207ee22bba780c556a7e (diff)
downloadbcm5719-llvm-52a4d9b4297832a51a75cdb57d0015ffb1899a63.tar.gz
bcm5719-llvm-52a4d9b4297832a51a75cdb57d0015ffb1899a63.zip
AMDGPU: Move R600 only pieces into R600 classes
llvm-svn: 274979
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
index e4f9634b989..9a00ecb24eb 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
@@ -59,63 +59,6 @@ bool AMDGPUInstrInfo::shouldScheduleLoadsNear(SDNode *Load0, SDNode *Load1,
return (NumLoads <= 16 && (Offset1 - Offset0) < 64);
}
-int AMDGPUInstrInfo::getIndirectIndexBegin(const MachineFunction &MF) const {
- const MachineRegisterInfo &MRI = MF.getRegInfo();
- const MachineFrameInfo *MFI = MF.getFrameInfo();
- int Offset = -1;
-
- if (MFI->getNumObjects() == 0) {
- return -1;
- }
-
- if (MRI.livein_empty()) {
- return 0;
- }
-
- const TargetRegisterClass *IndirectRC = getIndirectAddrRegClass();
- for (MachineRegisterInfo::livein_iterator LI = MRI.livein_begin(),
- LE = MRI.livein_end();
- LI != LE; ++LI) {
- unsigned Reg = LI->first;
- if (TargetRegisterInfo::isVirtualRegister(Reg) ||
- !IndirectRC->contains(Reg))
- continue;
-
- unsigned RegIndex;
- unsigned RegEnd;
- for (RegIndex = 0, RegEnd = IndirectRC->getNumRegs(); RegIndex != RegEnd;
- ++RegIndex) {
- if (IndirectRC->getRegister(RegIndex) == Reg)
- break;
- }
- Offset = std::max(Offset, (int)RegIndex);
- }
-
- return Offset + 1;
-}
-
-int AMDGPUInstrInfo::getIndirectIndexEnd(const MachineFunction &MF) const {
- int Offset = 0;
- const MachineFrameInfo *MFI = MF.getFrameInfo();
-
- // Variable sized objects are not supported
- if (MFI->hasVarSizedObjects()) {
- return -1;
- }
-
- if (MFI->getNumObjects() == 0) {
- return -1;
- }
-
- const AMDGPUSubtarget &ST = MF.getSubtarget<AMDGPUSubtarget>();
- const AMDGPUFrameLowering *TFL = ST.getFrameLowering();
-
- unsigned IgnoredFrameReg;
- Offset = TFL->getFrameIndexReference(MF, -1, IgnoredFrameReg);
-
- return getIndirectIndexBegin(MF) + Offset;
-}
-
int AMDGPUInstrInfo::getMaskedMIMGOp(uint16_t Opcode, unsigned Channels) const {
switch (Channels) {
default: return Opcode;
OpenPOWER on IntegriCloud