diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:38 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:38 +0000 |
commit | cf846100d8c1ef3f3a6b914656e480ad9776bfe5 (patch) | |
tree | 1f87f6a887c6b31afcb727a3c31591a6345461dd /llvm/lib/CodeGen/LiveIntervalUnion.cpp | |
parent | 2e98ee31b3c013dff3cbffa2a2b8a885ec18b2cb (diff) | |
download | bcm5719-llvm-cf846100d8c1ef3f3a6b914656e480ad9776bfe5.tar.gz bcm5719-llvm-cf846100d8c1ef3f3a6b914656e480ad9776bfe5.zip |
Avoid dereferencing end() in collectInterferingVRegs() when there is no
interference.
llvm-svn: 122108
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalUnion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp index 7ebe96f0660..cec68850fa8 100644 --- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp +++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp @@ -238,7 +238,7 @@ collectInterferingVRegs(unsigned MaxInterferingRegs) { InterferenceResult IR = firstInterference(); LiveInterval::iterator VirtRegEnd = VirtReg->end(); LiveInterval *RecentInterferingVReg = NULL; - while (IR.LiveUnionI.valid()) { + if (IR.VirtRegI != VirtRegEnd) while (IR.LiveUnionI.valid()) { // Advance the union's iterator to reach an unseen interfering vreg. do { if (IR.LiveUnionI.value() == RecentInterferingVReg) |