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

Alkis Evlogimenos alkis at niobe.cs.uiuc.edu
Wed Feb 18 17:16:01 PST 2004


Changes in directory llvm/include/llvm/CodeGen:

LiveIntervals.h updated: 1.18 -> 1.19

---
Log message:

Move unused typedefs in private section. Add method to return interval
given a register.


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

Index: llvm/include/llvm/CodeGen/LiveIntervals.h
diff -u llvm/include/llvm/CodeGen/LiveIntervals.h:1.18 llvm/include/llvm/CodeGen/LiveIntervals.h:1.19
--- llvm/include/llvm/CodeGen/LiveIntervals.h:1.18	Mon Feb 16 23:14:37 2004
+++ llvm/include/llvm/CodeGen/LiveIntervals.h	Wed Feb 18 17:14:52 2004
@@ -85,8 +85,6 @@
         };
 
         typedef std::list<Interval> Intervals;
-        typedef std::map<unsigned, unsigned> Reg2RegMap;
-        typedef std::vector<MachineBasicBlock*> MachineBasicBlockPtrs;
 
     private:
         MachineFunction* mf_;
@@ -108,6 +106,7 @@
         typedef std::map<unsigned, Intervals::iterator> Reg2IntervalMap;
         Reg2IntervalMap r2iMap_;
 
+        typedef std::map<unsigned, unsigned> Reg2RegMap;
         Reg2RegMap r2rMap_;
 
         Intervals intervals_;
@@ -118,6 +117,11 @@
 
         /// runOnMachineFunction - pass entry point
         virtual bool runOnMachineFunction(MachineFunction&);
+
+        Interval& getInterval(unsigned reg) {
+            assert(r2iMap_.count(reg)&& "Interval does not exist for register");
+            return *r2iMap_.find(reg)->second;
+        }
 
         unsigned getInstructionIndex(MachineInstr* instr) const;
 





More information about the llvm-commits mailing list