diff options
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervals.h')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervals.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/LiveIntervals.h b/include/llvm/CodeGen/LiveIntervals.h index 82cf91c..5aea679 100644 --- a/include/llvm/CodeGen/LiveIntervals.h +++ b/include/llvm/CodeGen/LiveIntervals.h @@ -85,8 +85,6 @@ namespace llvm { }; typedef std::list<Interval> Intervals; - typedef std::map<unsigned, unsigned> Reg2RegMap; - typedef std::vector<MachineBasicBlock*> MachineBasicBlockPtrs; private: MachineFunction* mf_; @@ -108,6 +106,7 @@ namespace llvm { typedef std::map<unsigned, Intervals::iterator> Reg2IntervalMap; Reg2IntervalMap r2iMap_; + typedef std::map<unsigned, unsigned> Reg2RegMap; Reg2RegMap r2rMap_; Intervals intervals_; @@ -119,6 +118,11 @@ namespace llvm { /// 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; MachineInstr* getInstructionFromIndex(unsigned index) const; |