Skip to content
Commit 41f8dc89 authored by Jakob Stoklund Olesen's avatar Jakob Stoklund Olesen
Browse files

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.

llvm-svn: 103747
parent 670a4104
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment