commit | 7d4f25904de543b039a28eddbea3034a5d80e7f8 | [log] [tgz] |
---|---|---|
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | Fri May 14 00:02:20 2010 +0000 |
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | Fri May 14 00:02:20 2010 +0000 |
tree | 39b1274f6604e86b1dc7807fc0e73becc74513e7 | |
parent | dbf67fefeaccfeb53fb9d6098180ba1f29e682d5 [diff] |
Fix an embarrassing runtime regression for RegAllocFast. This loop is quadratic in the capacity for a DenseMap: while(!map.empty()) map.erase(map.begin()); Instead we now do a normal begin() - end() iteration followed by map.clear(). That also has the nice sideeffect of shrinking the map capacity on demand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103747 91177308-0d34-0410-b5e6-96231b3b80d8