[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Feb 8 19:44:02 PST 2004


Changes in directory llvm/lib/CodeGen:

LiveVariables.cpp updated: 1.18 -> 1.19

---
Log message:

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


---
Diffs of the changes:  (+7 -6)

Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.18 llvm/lib/CodeGen/LiveVariables.cpp:1.19
--- llvm/lib/CodeGen/LiveVariables.cpp:1.18	Sun Feb  8 19:35:21 2004
+++ llvm/lib/CodeGen/LiveVariables.cpp	Sun Feb  8 19:43:23 2004
@@ -146,14 +146,15 @@
 
   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;
   }
 }
 





More information about the llvm-commits mailing list