Add a BitVector class.
[oota-llvm.git] / include / llvm / CodeGen / LiveIntervalAnalysis.h
index 11f836b99ac8b326b0d5920461672ff2f13654de..70c189df7806800a6655feb5c9797170194a1642 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef LLVM_CODEGEN_LIVEINTERVAL_ANALYSIS_H
 #define LLVM_CODEGEN_LIVEINTERVAL_ANALYSIS_H
 
-#include "llvm/ADT/DenseMap.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/LiveInterval.h"
+#include "llvm/ADT/IndexedMap.h"
 
 namespace llvm {
 
@@ -51,7 +51,7 @@ namespace llvm {
     typedef std::map<unsigned, LiveInterval> Reg2IntervalMap;
     Reg2IntervalMap r2iMap_;
 
-    typedef DenseMap<unsigned> Reg2RegMap;
+    typedef IndexedMap<unsigned> Reg2RegMap;
     Reg2RegMap r2rMap_;
 
     std::vector<bool> allocatableRegs_;
@@ -161,6 +161,9 @@ namespace llvm {
 
     /// print - Implement the dump method.
     virtual void print(std::ostream &O, const Module* = 0) const;
+    void print(std::ostream *O, const Module* M = 0) const {
+      if (O) print(*O, M);
+    }
 
   private:
     /// RemoveMachineInstrFromMaps - This marks the specified machine instr as