summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitbbd9a43d206d12a04562ecd676c5cd55b9964bc0 (patch)
treeeaac88cf7551879006ec826dff12581275cca785 /llvm/lib/CodeGen/LiveVariables.cpp
parent26407384ec7a386acf5e15c46d05c6b1ad8b5da7 (diff)
downloadbcm5719-llvm-bbd9a43d206d12a04562ecd676c5cd55b9964bc0.tar.gz
bcm5719-llvm-bbd9a43d206d12a04562ecd676c5cd55b9964bc0.zip
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 llvm-svn: 11217
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index eafbb1c18a3..a8627396ccc 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/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;
}
}
OpenPOWER on IntegriCloud