diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-09 01:43:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-09 01:43:23 +0000 |
commit | bbd9a43d206d12a04562ecd676c5cd55b9964bc0 (patch) | |
tree | eaac88cf7551879006ec826dff12581275cca785 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 26407384ec7a386acf5e15c46d05c6b1ad8b5da7 (diff) | |
download | bcm5719-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.cpp | 13 |
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; } } |