Eliminate the use of spill (reserved) registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11476 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h
index f322ae3..ca25586 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.h
+++ b/lib/CodeGen/LiveIntervalAnalysis.h
@@ -100,6 +100,9 @@
typedef std::map<MachineInstr*, unsigned> Mi2IndexMap;
Mi2IndexMap mi2iMap_;
+ typedef std::vector<MachineInstr*> Index2MiMap;
+ Index2MiMap i2miMap_;
+
typedef std::map<unsigned, Intervals::iterator> Reg2IntervalMap;
Reg2IntervalMap r2iMap_;
@@ -114,14 +117,13 @@
/// runOnMachineFunction - pass entry point
virtual bool runOnMachineFunction(MachineFunction&);
+ unsigned getInstructionIndex(MachineInstr* instr) const;
+
+ MachineInstr* getInstructionFromIndex(unsigned index) const;
+
Intervals& getIntervals() { return intervals_; }
- const Reg2RegMap& getJoinedRegMap() const {
- return r2rMap_;
- }
-
- /// rep - returns the representative of this register
- unsigned rep(unsigned reg);
+ void updateSpilledInterval(Interval& i);
private:
/// computeIntervals - compute live intervals
@@ -151,7 +153,8 @@
bool overlapsAliases(const Interval& lhs, const Interval& rhs) const;
- unsigned getInstructionIndex(MachineInstr* instr) const;
+ /// rep - returns the representative of this register
+ unsigned rep(unsigned reg);
void printRegName(unsigned reg) const;
};