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 | a1613db62fec94845aa8306232fb665273615bad (patch) | |
tree | d9b541005246a4308a815f53a347f5cbc3714c61 /include/llvm/CodeGen/LiveInterval.h | |
parent | 7d91e49ff7bcc0fd10a54d45a6185bb05adf3d20 (diff) | |
download | external_llvm-a1613db62fec94845aa8306232fb665273615bad.zip external_llvm-a1613db62fec94845aa8306232fb665273615bad.tar.gz external_llvm-a1613db62fec94845aa8306232fb665273615bad.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 75acf52..dde7a86 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/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() { |