Change the way we choose a free register: instead of picking the first
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Thu, 2 Sep 2004 21:23:32 +0000 (21:23 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Thu, 2 Sep 2004 21:23:32 +0000 (21:23 +0000)
commit84f5bcb0139789010eb4a4509fddf811def8794e
tree0f2bde19ae2f81f584a36b8416118f11d9de3da8
parent679ff31e93fb99799e7cefd4dddadf8d1b1cd7d4
Change the way we choose a free register: instead of picking the first
free allocatable register, we prefer the a free one with the most uses
of inactive intervals. This causes less spills and performes a bit
better compared to gcc:

Program                 | GCC/LLC (Before)| GCC/LLC (After)
164.gzip/164.gzip       | 0.59            | 0.60
175.vpr/175.vpr         | 0.57            | 0.58
176.gcc/176.gcc         | 0.59            | 0.61
181.mcf/181.mcf         | 0.94            | 0.95
186.crafty/186.crafty   | 0.62            | 0.62
197.parser/197.parser   | 0.89            | 0.88
252.eon/252.eon         | 0.61            | 0.66
253.perlbmk/253.perlbmk | 0.79            | 0.84
254.gap/254.gap         | 0.81            | 0.81
255.vortex/255.vortex   | 0.92            | 0.93
256.bzip2/256.bzip2     | 0.69            | 0.69
300.twolf/300.twolf     | 0.91            | 0.90

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16147 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocLinearScan.cpp