summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervals.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervals.h')
-rw-r--r--llvm/lib/CodeGen/LiveIntervals.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervals.h b/llvm/lib/CodeGen/LiveIntervals.h
index 5b78342e281..7587e4f6f89 100644
--- a/llvm/lib/CodeGen/LiveIntervals.h
+++ b/llvm/lib/CodeGen/LiveIntervals.h
@@ -36,11 +36,12 @@ namespace llvm {
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 @@ namespace llvm {
/// 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);
OpenPOWER on IntegriCloud