Switch to using smallvector for liveintervals. This speeds up live interval
authorChris Lattner <sabre@nondot.org>
Tue, 22 Aug 2006 06:32:56 +0000 (06:32 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 22 Aug 2006 06:32:56 +0000 (06:32 +0000)
analysis 11% on kc++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29812 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveInterval.h

index fc216b5939d75b13e68f14c011cc6fa57cfd646a..183cd9abc9fdeb78f25574c5ce9e9774b447d2b4 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef LLVM_CODEGEN_LIVEINTERVAL_H
 #define LLVM_CODEGEN_LIVEINTERVAL_H
 
+#include "llvm/ADT/SmallVector.h"
 #include <iosfwd>
 #include <vector>
 #include <cassert>
@@ -72,7 +73,7 @@ namespace llvm {
   /// register or value.  This class also contains a bit of register allocator
   /// state.
   struct LiveInterval {
-    typedef std::vector<LiveRange> Ranges;
+    typedef SmallVector<LiveRange,4> Ranges;
     unsigned reg;        // the register of this interval
     float weight;        // weight of this interval
     Ranges ranges;       // the ranges in which this register is live