diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-24 11:44:15 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-24 11:44:15 +0000 |
commit | cf72e7f8547076a5b3d74aa8bfc311253558d4da (patch) | |
tree | c1fb1fd887d36390c8e25f9e9387290b0e041f5b /llvm/lib/CodeGen/LiveInterval.h | |
parent | 4e0969b50018db5ebb9623ecf79fd732dc77eb62 (diff) | |
download | bcm5719-llvm-cf72e7f8547076a5b3d74aa8bfc311253558d4da.tar.gz bcm5719-llvm-cf72e7f8547076a5b3d74aa8bfc311253558d4da.zip |
Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.
llvm-svn: 15167
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.h')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.h b/llvm/lib/CodeGen/LiveInterval.h index 75acf52c4ac..dde7a86712c 100644 --- a/llvm/lib/CodeGen/LiveInterval.h +++ b/llvm/lib/CodeGen/LiveInterval.h @@ -76,6 +76,21 @@ namespace llvm { : reg(Reg), weight(Weight), NumValues(0) { } + LiveInterval& operator=(const LiveInterval& rhs) { + reg = rhs.reg; + weight = rhs.weight; + ranges = rhs.ranges; + NumValues = rhs.NumValues; + return *this; + } + + void swap(LiveInterval& other) { + std::swap(reg, other.reg); + std::swap(weight, other.weight); + ranges.swap(other.ranges); + std::swap(NumValues, other.NumValues); + } + bool containsOneValue() const { return NumValues == 1; } unsigned getNextValue() { |