diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-01 23:16:41 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-01 23:16:41 +0000 |
commit | b5af2d943ed568f2f4cac545b6dfb150ae9d73aa (patch) | |
tree | 13a247848babe11f9910bf5aaf5644677723ac60 /include/llvm/Target | |
parent | ebf8c27caea0a1c55df649c78ced28d9fa78093e (diff) | |
download | external_llvm-b5af2d943ed568f2f4cac545b6dfb150ae9d73aa.zip external_llvm-b5af2d943ed568f2f4cac545b6dfb150ae9d73aa.tar.gz external_llvm-b5af2d943ed568f2f4cac545b6dfb150ae9d73aa.tar.bz2 |
Specify SubRegIndex components on the index itself.
It is simpler to define a composite index directly:
def ssub_2 : SubRegIndex<[dsub_1, ssub_0]>;
def ssub_3 : SubRegIndex<[dsub_1, ssub_1]>;
Than specifying the composite indices on each register:
CompositeIndices = [(ssub_2 dsub_1, ssub_0),
(ssub_3 dsub_1, ssub_1)] in ...
This also makes it clear that SubRegIndex composition is supposed to be
unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/Target.td | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td index 84e6b1b..fa1ec55 100644 --- a/include/llvm/Target/Target.td +++ b/include/llvm/Target/Target.td @@ -22,8 +22,12 @@ include "llvm/Intrinsics.td" class RegisterClass; // Forward def // SubRegIndex - Use instances of SubRegIndex to identify subregisters. -class SubRegIndex { +class SubRegIndex<list<SubRegIndex> comps = []> { string Namespace = ""; + + // ComposedOf - A list of two SubRegIndex instances, [A, B]. + // This indicates that this SubRegIndex is the result of composing A and B. + list<SubRegIndex> ComposedOf = comps; } // RegAltNameIndex - The alternate name set to use for register operands of |