diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-29 06:56:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-29 06:56:51 +0000 |
commit | 49b34f3f51224a39037d80b3e3efc847064ba1a0 (patch) | |
tree | 1326d0eb8900ec9c6bfc0f316ff64972273f700b /llvm/lib/CodeGen/LiveIntervals.cpp | |
parent | 1a920d49f6c3036d6c92f0daec61ddc2a2bffe6b (diff) | |
download | bcm5719-llvm-49b34f3f51224a39037d80b3e3efc847064ba1a0.tar.gz bcm5719-llvm-49b34f3f51224a39037d80b3e3efc847064ba1a0.zip |
Do not dereference end iterators. It hurts when you do that.
llvm-svn: 14474
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervals.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervals.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervals.cpp b/llvm/lib/CodeGen/LiveIntervals.cpp index 196d6944b7e..7569875ad08 100644 --- a/llvm/lib/CodeGen/LiveIntervals.cpp +++ b/llvm/lib/CodeGen/LiveIntervals.cpp @@ -356,8 +356,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, } // a variable can only be killed by subsequent instructions - do { - ++mi; + for (++mi; mi != e; ++mi) { baseIndex += InstrSlots::NUM; for (KillIter ki = lv_->killed_begin(mi), ke = lv_->killed_end(mi); ki != ke; ++ki) { @@ -367,7 +366,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, goto exit; } } - } while (mi != e); + } exit: assert(start < end && "did not find end of interval?"); |