Inflate register classes after coalescing.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Aug 2011 18:19:41 +0000 (18:19 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 9 Aug 2011 18:19:41 +0000 (18:19 +0000)
commit4a74b3b933e2944ff313dc5d24da6f9e8ec4c1c4
tree93ee9fb3cd121c4c46e3644a7597784dc185a785
parente2406dfd8940b3178bf452d89fed2a5df7a63043
Inflate register classes after coalescing.

Coalescing can remove copy-like instructions with sub-register operands
that constrained the register class.  Examples are:

  x86: GR32_ABCD:sub_8bit_hi -> GR32
  arm: DPR_VFP2:ssub0 -> DPR

Recompute the register class of any virtual registers that are used by
less instructions after coalescing.

This affects code generation for the Cortex-A8 where we use NEON
instructions for f32 operations, c.f. fp_convert.ll:

  vadd.f32  d16, d1, d0
  vcvt.s32.f32  d0, d16

The register allocator is now free to use d16 for the temporary, and
that comes first in the allocation order because it doesn't interfere
with any s-registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137133 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp
test/CodeGen/ARM/fabss.ll
test/CodeGen/ARM/fp_convert.ll