summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetRegisterInfo.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-03 22:49:00 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-03 22:49:00 +0000
commit1a2a19dd3ce2b163837b5f0a1ea474c72527cad6 (patch)
treec990648cb2c4a048f0e99c9e71c1988705ce5fb2 /include/llvm/Target/TargetRegisterInfo.h
parent6a0ed18532425d637ecc1cc851c559db446ec4e8 (diff)
downloadllvm-1a2a19dd3ce2b163837b5f0a1ea474c72527cad6.tar.gz
llvm-1a2a19dd3ce2b163837b5f0a1ea474c72527cad6.tar.bz2
llvm-1a2a19dd3ce2b163837b5f0a1ea474c72527cad6.tar.xz
Add TargetRegisterClass::getSuperRegIndices().
This is a pointer into one of the tables used by getMatchingSuperRegClass(). It makes it possible to use a shared implementation of that function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetRegisterInfo.h')
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index dd8044dd85..85562b6010 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -43,6 +43,7 @@ public:
const MCRegisterClass *MC;
const vt_iterator VTs;
const uint32_t *SubClassMask;
+ const uint16_t *SuperRegIndices;
const sc_iterator SuperClasses;
const sc_iterator SuperRegClasses;
ArrayRef<uint16_t> (*OrderFunc)(const MachineFunction&);
@@ -163,6 +164,18 @@ public:
return SubClassMask;
}
+ /// getSuperRegIndices - Returns a 0-terminated list of sub-register indices
+ /// that projec some super-register class into this register class. The list
+ /// has an entry for each Idx such that:
+ ///
+ /// There exists SuperRC where:
+ /// For all Reg in SuperRC:
+ /// this->contains(Reg:Idx)
+ ///
+ const uint16_t *getSuperRegIndices() const {
+ return SuperRegIndices;
+ }
+
/// getSuperClasses - Returns a NULL terminated list of super-classes. The
/// classes are ordered by ID which is also a topological ordering from large
/// to small classes. The list does NOT include the current class.