diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-04-09 18:07:57 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-04-09 18:07:57 +0000 |
commit | 237f203ca93442fde8cb6957bd283427424c390c (patch) | |
tree | 59c8129e307d81489acd267c8bf6dbe511860ca5 /llvm/lib/CodeGen/LiveIntervals.h | |
parent | 417228d00a14bead735e66e9c5c94f959976110b (diff) | |
download | bcm5719-llvm-237f203ca93442fde8cb6957bd283427424c390c.tar.gz bcm5719-llvm-237f203ca93442fde8cb6957bd283427424c390c.zip |
Add definition list to each live interval.
llvm-svn: 12791
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervals.h')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervals.h | 10 |
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); |