[llvm] r224803 - LiveIntervalAnalysis: Fix performance bug that I introduced in r224663.
Matthias Braun
matze at braunis.de
Tue Dec 23 18:11:43 PST 2014
Author: matze
Date: Tue Dec 23 20:11:43 2014
New Revision: 224803
URL: http://llvm.org/viewvc/llvm-project?rev=224803&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=224803&r1=224802&r2=224803&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Dec 23 20:11:43 2014
@@ -676,7 +676,7 @@ void LiveIntervals::addKillFlags(const V
// 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 V
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);
More information about the llvm-commits
mailing list