OSDN Git Service

Keep track of which stage produced a live range, and bypass earlier stages when revis...
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 1 Mar 2011 21:10:07 +0000 (21:10 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 1 Mar 2011 21:10:07 +0000 (21:10 +0000)
commit22a1df6bf24c188dd637a0bb2cf9a2648806b6b1
treee654af006146265a5d55ebacb61597e4d31d9588
parentc92cb649e30f1a4119b8fc9d97caf70f1a21c646
Keep track of which stage produced a live range, and bypass earlier stages when revisiting.

This effectively disables the 'turbo' functionality of the greedy register
allocator where all new live ranges created by splitting would be reconsidered
as if they were originals.

There are two reasons for doing this, 1. It guarantees that the algorithm
terminates. Early versions were prone to infinite looping in certain corner
cases. 2. It is a 2x speedup. We can skip a lot of unnecessary interference
checks that won't lead to good splitting anyway.

The problem is that region splitting only gets one shot, so it should probably
be changed to target multiple physical registers at once.

Local live range splitting is still 'turbo' enabled. It only accounts for a
small fraction of compile time, so it is probably not necessary to do anything
about that.

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