From: Matthias Braun Date: Wed, 24 Dec 2014 02:11:43 +0000 (+0000) Subject: LiveIntervalAnalysis: Fix performance bug that I introduced in r224663. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=94daeceeacb0f67a7049ff6cd6c3a9ec793e4720;p=oota-llvm.git LiveIntervalAnalysis: Fix performance bug that I introduced in r224663. Without a reference the code did not remember when moving the iterators of the subranges/registerunit ranges forward and instead would scan from the beginning again at the next position. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224803 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 8c53658595c..56f38b6407d 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -676,7 +676,7 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) { // There should be no kill flag on FOO when %vreg5 is rewritten as %EAX. for (auto &RUP : RU) { const LiveRange &RURange = *RUP.first; - LiveRange::const_iterator I = RUP.second; + LiveRange::const_iterator &I = RUP.second; if (I == RURange.end()) continue; I = RURange.advanceTo(I, RI->end); @@ -704,7 +704,7 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) { DefinedLanesMask = 0; for (auto &SRP : SRs) { const LiveInterval::SubRange &SR = *SRP.first; - LiveRange::const_iterator I = SRP.second; + LiveRange::const_iterator &I = SRP.second; if (I == SR.end()) continue; I = SR.advanceTo(I, RI->end);