Remove support for PhysReg joining.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 May 2012 17:18:58 +0000 (17:18 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 May 2012 17:18:58 +0000 (17:18 +0000)
commitd78d7b05ae3c42e228f41132090161e753bc103a
tree76d1e69ddb512f77b2cd9b9eec2084540c416175
parent30cb377cdf761fa7f58a55fa578faf8949a3a2fa
Remove support for PhysReg joining.

This has been disabled for a while, and it is not a feature we want to
support. Copies between physical and virtual registers are eliminated by
good hinting support in the register allocator. Joining virtual and
physical registers is really a form of register allocation, and the
coalescer is not properly equipped to do that. In particular, it cannot
backtrack coalescing decisions, and sometimes that would cause it to
create programs that were impossible to register allocate, by exhausting
a small register class.

It was also very difficult to keep track of the live ranges of aliasing
registers when extending the live range of a physreg. By disabling
physreg joining, we can let fixed physreg live ranges remain constant
throughout the register allocator super-pass.

One type of physreg joining remains: A virtual register that has a
single value which is a copy of a reserved register can be merged into
the reserved physreg. This always lowers register pressure, and since we
don't compute live ranges for reserved registers, there are no problems
with aliases.

llvm-svn: 157055
llvm/lib/CodeGen/RegisterCoalescer.cpp