aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-12-19 16:53:34 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-12-19 16:53:34 +0000
commit570f9a972e02830d1ca223743dd6b4cc4fdf9549 (patch)
treeff67aae70fb2690c391b75f7ec47ff5a4fc5c55c /include
parenta9f65b9a1f57dcf546399ac32bf89d71d20df5b9 (diff)
downloadexternal_llvm-570f9a972e02830d1ca223743dd6b4cc4fdf9549.zip
external_llvm-570f9a972e02830d1ca223743dd6b4cc4fdf9549.tar.gz
external_llvm-570f9a972e02830d1ca223743dd6b4cc4fdf9549.tar.bz2
Emit a getMatchingSuperRegClass() implementation for every target.
Use information computed while inferring new register classes to emit accurate, table-driven implementations of getMatchingSuperRegClass(). Delete the old manual, error-prone implementations in the targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 682aa50..803ff9f 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -402,11 +402,11 @@ public:
/// getMatchingSuperRegClass - Return a subclass of the specified register
/// class A so that each register in it has a sub-register of the
/// specified sub-register index which is in the specified register class B.
+ ///
+ /// TableGen will synthesize missing A sub-classes.
virtual const TargetRegisterClass *
getMatchingSuperRegClass(const TargetRegisterClass *A,
- const TargetRegisterClass *B, unsigned Idx) const {
- return 0;
- }
+ const TargetRegisterClass *B, unsigned Idx) const =0;
/// getSubClassWithSubReg - Returns the largest legal sub-class of RC that
/// supports the sub-register index Idx.
@@ -419,6 +419,7 @@ public:
/// supported by the full GR32 register class in 64-bit mode, but only by the
/// GR32_ABCD regiister class in 32-bit mode.
///
+ /// TableGen will synthesize missing RC sub-classes.
virtual const TargetRegisterClass *
getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const =0;