summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-07-24 11:44:15 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-07-24 11:44:15 +0000
commita1613db62fec94845aa8306232fb665273615bad (patch)
treed9b541005246a4308a815f53a347f5cbc3714c61 /include/llvm/CodeGen/LiveInterval.h
parent7d91e49ff7bcc0fd10a54d45a6185bb05adf3d20 (diff)
downloadexternal_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.h15
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() {