aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-09 01:43:23 +0000
committerChris Lattner <sabre@nondot.org>2004-02-09 01:43:23 +0000
commit499487742ec4299852f7ae8962acebf7bc2a22a4 (patch)
treef6522c90f2b24350b57be26b3e599dc731acff51 /lib/CodeGen/LiveVariables.cpp
parent96aef893383a6ffcc6d6955c5d969f0fd57831c2 (diff)
Ugh, perform an optimization that GCC should be able to do itself. This
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index eafbb1c18a..a8627396cc 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -146,14 +146,15 @@ void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI) {
for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg);
*AliasSet; ++AliasSet) {
- if (MachineInstr *LastUse = PhysRegInfo[*AliasSet]) {
- if (PhysRegUsed[*AliasSet])
- RegistersKilled.insert(std::make_pair(LastUse, *AliasSet));
+ unsigned Alias = *AliasSet;
+ if (MachineInstr *LastUse = PhysRegInfo[Alias]) {
+ if (PhysRegUsed[Alias])
+ RegistersKilled.insert(std::make_pair(LastUse, Alias));
else
- RegistersDead.insert(std::make_pair(LastUse, *AliasSet));
+ RegistersDead.insert(std::make_pair(LastUse, Alias));
}
- PhysRegInfo[*AliasSet] = MI;
- PhysRegUsed[*AliasSet] = false;
+ PhysRegInfo[Alias] = MI;
+ PhysRegUsed[Alias] = false;
}
}