summaryrefslogtreecommitdiff
path: root/lib/Target/TargetRegisterInfo.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-06-15 06:53:50 +0000
committerOwen Anderson <resistor@mac.com>2011-06-15 06:53:50 +0000
commit1e56a2a85fbafce5ceee72f72d41b84a71876844 (patch)
tree8c832d0127858ab033a7b5ada06ee555a8668672 /lib/Target/TargetRegisterInfo.cpp
parent9100a78bce4e1d34d8ffd5efa2cc79ed864dd1c0 (diff)
downloadllvm-1e56a2a85fbafce5ceee72f72d41b84a71876844.tar.gz
llvm-1e56a2a85fbafce5ceee72f72d41b84a71876844.tar.bz2
llvm-1e56a2a85fbafce5ceee72f72d41b84a71876844.tar.xz
Replace the statically generated hashtables for checking register relationships with just scanning the (typically tiny) static lists.
At the time I wrote this code (circa 2007), TargetRegisterInfo was using a std::set to perform these queries. Switching to the static hashtables was an obvious improvement, but in reality there's no reason to do anything other than scan. With this change, total LLC time on a whole-program 403.gcc is reduced by approximately 1.5%, almost all of which comes from a 15% reduction in LiveVariables time. It also reduces the binary size of LLC by 86KB, thanks to eliminating a bunch of very large static tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetRegisterInfo.cpp')
-rw-r--r--lib/Target/TargetRegisterInfo.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/TargetRegisterInfo.cpp b/lib/Target/TargetRegisterInfo.cpp
index 1c3f2dda33..e36e136450 100644
--- a/lib/Target/TargetRegisterInfo.cpp
+++ b/lib/Target/TargetRegisterInfo.cpp
@@ -23,12 +23,8 @@ using namespace llvm;
TargetRegisterInfo::TargetRegisterInfo(const TargetRegisterDesc *D, unsigned NR,
regclass_iterator RCB, regclass_iterator RCE,
const char *const *subregindexnames,
- int CFSO, int CFDO,
- const unsigned* subregs, const unsigned subregsize,
- const unsigned* aliases, const unsigned aliasessize)
- : SubregHash(subregs), SubregHashSize(subregsize),
- AliasesHash(aliases), AliasesHashSize(aliasessize),
- Desc(D), SubRegIndexNames(subregindexnames), NumRegs(NR),
+ int CFSO, int CFDO)
+ : Desc(D), SubRegIndexNames(subregindexnames), NumRegs(NR),
RegClassBegin(RCB), RegClassEnd(RCE) {
assert(isPhysicalRegister(NumRegs) &&
"Target has too many physical registers!");