1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

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.

llvm-svn: 224803
This commit is contained in:
Matthias Braun 2014-12-24 02:11:43 +00:00
parent e82997fcba
commit 2e61b0a55a

View File

@ -676,7 +676,7 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) {
// There should be no kill flag on FOO when %vreg5 is rewritten as %EAX. // There should be no kill flag on FOO when %vreg5 is rewritten as %EAX.
for (auto &RUP : RU) { for (auto &RUP : RU) {
const LiveRange &RURange = *RUP.first; const LiveRange &RURange = *RUP.first;
LiveRange::const_iterator I = RUP.second; LiveRange::const_iterator &I = RUP.second;
if (I == RURange.end()) if (I == RURange.end())
continue; continue;
I = RURange.advanceTo(I, RI->end); I = RURange.advanceTo(I, RI->end);
@ -704,7 +704,7 @@ void LiveIntervals::addKillFlags(const VirtRegMap *VRM) {
DefinedLanesMask = 0; DefinedLanesMask = 0;
for (auto &SRP : SRs) { for (auto &SRP : SRs) {
const LiveInterval::SubRange &SR = *SRP.first; const LiveInterval::SubRange &SR = *SRP.first;
LiveRange::const_iterator I = SRP.second; LiveRange::const_iterator &I = SRP.second;
if (I == SR.end()) if (I == SR.end())
continue; continue;
I = SR.advanceTo(I, RI->end); I = SR.advanceTo(I, RI->end);