diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 921c5572b9..2a8c2c8841 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -774,7 +774,10 @@ namespace llvm { void ComputeJoinedWeight(const LiveInterval &Other); bool operator<(const LiveInterval& other) const { - return beginIndex() < other.beginIndex(); + const MachineInstrIndex &thisIndex = beginIndex(); + const MachineInstrIndex &otherIndex = other.beginIndex(); + return (thisIndex < otherIndex || + (thisIndex == otherIndex && reg < other.reg)); } void print(raw_ostream &OS, const TargetRegisterInfo *TRI = 0) const; |