[llvm-commits] [llvm] r125728 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Cameron Zwarich zwarich at apple.com
Wed Feb 16 22:52:07 PST 2011


Author: zwarich
Date: Thu Feb 17 00:52:07 2011
New Revision: 125728

URL: http://llvm.org/viewvc/llvm-project?rev=125728&view=rev
Log:
Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.

Modified:
    llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=125728&r1=125727&r2=125728&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Thu Feb 17 00:52:07 2011
@@ -1425,9 +1425,9 @@
                                                std::vector<CopyRec> &TryAgain) {
   DEBUG(dbgs() << MBB->getName() << ":\n");
 
-  std::vector<CopyRec> VirtCopies;
-  std::vector<CopyRec> PhysCopies;
-  std::vector<CopyRec> ImpDefCopies;
+  SmallVector<CopyRec, 8> VirtCopies;
+  SmallVector<CopyRec, 8> PhysCopies;
+  SmallVector<CopyRec, 8> ImpDefCopies;
   for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end();
        MII != E;) {
     MachineInstr *Inst = MII++;





More information about the llvm-commits mailing list