[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 21 23:33:10 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

LiveInterval.h updated: 1.17 -> 1.18
---
Log message:

Switch to using smallvector for liveintervals.  This speeds up live interval
analysis 11% on kc++.


---
Diffs of the changes:  (+2 -1)

 LiveInterval.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/LiveInterval.h
diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.17 llvm/include/llvm/CodeGen/LiveInterval.h:1.18
--- llvm/include/llvm/CodeGen/LiveInterval.h:1.17	Mon Aug 21 18:15:12 2006
+++ llvm/include/llvm/CodeGen/LiveInterval.h	Tue Aug 22 01:32:56 2006
@@ -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 @@
   /// 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






More information about the llvm-commits mailing list