summaryrefslogtreecommitdiff
path: root/lib/Target/R600/SIRegisterInfo.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-11-13 23:36:50 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-11-13 23:36:50 +0000
commita2b4eb6d15a13de257319ac6231b5ab622cd02b1 (patch)
tree3147a7994db9c80cbaa22526fae0dbfdc780c212 /lib/Target/R600/SIRegisterInfo.cpp
parentb52bf6a3b31596a309f4b12884522e9b4a344654 (diff)
downloadllvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.tar.gz
llvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.tar.bz2
llvm-a2b4eb6d15a13de257319ac6231b5ab622cd02b1.tar.xz
R600/SI: Add support for private address space load/store
Private address space is emulated using the register file with MOVRELS and MOVRELD instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIRegisterInfo.cpp')
-rw-r--r--lib/Target/R600/SIRegisterInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/R600/SIRegisterInfo.cpp b/lib/Target/R600/SIRegisterInfo.cpp
index e06a02257f..0bbad09cf1 100644
--- a/lib/Target/R600/SIRegisterInfo.cpp
+++ b/lib/Target/R600/SIRegisterInfo.cpp
@@ -15,6 +15,7 @@
#include "SIRegisterInfo.h"
#include "AMDGPUTargetMachine.h"
+#include "SIInstrInfo.h"
using namespace llvm;
@@ -26,6 +27,9 @@ SIRegisterInfo::SIRegisterInfo(AMDGPUTargetMachine &tm)
BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
BitVector Reserved(getNumRegs());
Reserved.set(AMDGPU::EXEC);
+ Reserved.set(AMDGPU::INDIRECT_BASE_ADDR);
+ const SIInstrInfo *TII = static_cast<const SIInstrInfo*>(TM.getInstrInfo());
+ TII->reserveIndirectRegisters(Reserved, MF);
return Reserved;
}
@@ -51,6 +55,10 @@ const TargetRegisterClass * SIRegisterInfo::getCFGStructurizerRegClass(
}
}
+unsigned SIRegisterInfo::getHWRegIndex(unsigned Reg) const {
+ return getEncodingValue(Reg);
+}
+
const TargetRegisterClass *SIRegisterInfo::getPhysRegClass(unsigned Reg) const {
assert(!TargetRegisterInfo::isVirtualRegister(Reg));