diff options
author | Owen Anderson <resistor@mac.com> | 2008-06-27 01:22:50 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-06-27 01:22:50 +0000 |
commit | 21498f52b29a3095fd800c6b0b459b04d5f7b46e (patch) | |
tree | 70869760cfd93d36c09409d7e2748399094e374f /llvm/lib/CodeGen | |
parent | f96d046d7ce155494cc1885e7dc813809696aece (diff) | |
download | bcm5719-llvm-21498f52b29a3095fd800c6b0b459b04d5f7b46e.tar.gz bcm5719-llvm-21498f52b29a3095fd800c6b0b459b04d5f7b46e.zip |
Don't perform expensive queries checking for super and sub registers when we know that there aren't any.
This speed up LiveVariables on instcombine at -O0 -g from 0.3855s to 0.3503s. Look for more improvements in this area soon!
llvm-svn: 52804
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index e008c9a61b9..5da6a317cb0 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -780,6 +780,7 @@ bool MachineInstr::addRegisterDead(unsigned IncomingReg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound) { bool isPhysReg = TargetRegisterInfo::isPhysicalRegister(IncomingReg); + bool hasAliases = isPhysReg && RegInfo->getAliasSet(IncomingReg) == 0; bool Found = false; SmallVector<unsigned,4> DeadOps; for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { @@ -790,7 +791,7 @@ bool MachineInstr::addRegisterDead(unsigned IncomingReg, if (Reg == IncomingReg) { MO.setIsDead(); Found = true; - } else if (isPhysReg && MO.isDead() && + } else if (hasAliases && MO.isDead() && TargetRegisterInfo::isPhysicalRegister(Reg)) { // There exists a super-register that's marked dead. if (RegInfo->isSuperRegister(IncomingReg, Reg)) |