Add definition list to each live interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12791 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h
index 5b78342..7587e4f 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.h
+++ b/lib/CodeGen/LiveIntervalAnalysis.h
@@ -36,11 +36,12 @@
struct Interval {
typedef std::pair<unsigned, unsigned> Range;
typedef std::vector<Range> Ranges;
+ typedef std::vector<unsigned> Defs;
unsigned reg; // the register of this interval
float weight; // weight of this interval (number of uses
// * 10^loopDepth)
Ranges ranges; // the ranges in which this register is live
-
+ Defs defs;
Interval(unsigned r);
bool empty() const { return ranges.empty(); }
@@ -185,16 +186,19 @@
/// register def
void handleVirtualRegisterDef(MachineBasicBlock* mbb,
MachineBasicBlock::iterator mi,
- unsigned reg);
+ Interval& interval);
/// handlePhysicalRegisterDef - update intervals for a
/// physical register def
void handlePhysicalRegisterDef(MachineBasicBlock* mbb,
MachineBasicBlock::iterator mi,
- unsigned reg);
+ Interval& interval);
bool overlapsAliases(const Interval& lhs, const Interval& rhs) const;
+
+ Interval& getOrCreateInterval(unsigned reg);
+
/// rep - returns the representative of this register
unsigned rep(unsigned reg);