summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetRegisterInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-11 16:34:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-11 16:34:08 +0000
commitd346d4871a38c7aa99ddd2a3e6e183419d8e37d2 (patch)
tree6980d5cae13d6eb422c9e2b0aedece861395d69f /llvm/lib/Target/TargetRegisterInfo.cpp
parentdd40fda52d1a355d3c5cf366a32b5e8d938b43d7 (diff)
downloadbcm5719-llvm-d346d4871a38c7aa99ddd2a3e6e183419d8e37d2.tar.gz
bcm5719-llvm-d346d4871a38c7aa99ddd2a3e6e183419d8e37d2.zip
Add TRI::getSubRegIndexLaneMask().
Sub-register lane masks are bitmasks that can be used to determine if two sub-registers of a virtual register will overlap. For example, ARM's ssub0 and ssub1 sub-register indices don't overlap each other, but both overlap dsub0 and qsub0. The lane masks will be accurate on most targets, but on targets that use sub-register indexes in an irregular way, the masks may conservatively report that two sub-register indices overlap when the eventually allocated physregs don't. Irregular register banks also mean that the bits in a lane mask can't be mapped onto register units, but the concept is similar. llvm-svn: 163630
Diffstat (limited to 'llvm/lib/Target/TargetRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetRegisterInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetRegisterInfo.cpp b/llvm/lib/Target/TargetRegisterInfo.cpp
index 2395f2ba12a..be8b5828903 100644
--- a/llvm/lib/Target/TargetRegisterInfo.cpp
+++ b/llvm/lib/Target/TargetRegisterInfo.cpp
@@ -20,8 +20,10 @@ using namespace llvm;
TargetRegisterInfo::TargetRegisterInfo(const TargetRegisterInfoDesc *ID,
regclass_iterator RCB, regclass_iterator RCE,
- const char *const *subregindexnames)
- : InfoDesc(ID), SubRegIndexNames(subregindexnames),
+ const char *const *SRINames,
+ const unsigned *SRILaneMasks)
+ : InfoDesc(ID), SubRegIndexNames(SRINames),
+ SubRegIndexLaneMasks(SRILaneMasks),
RegClassBegin(RCB), RegClassEnd(RCE) {
}
OpenPOWER on IntegriCloud