Coalesce subreg-subreg copies.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 7 May 2012 22:57:55 +0000 (22:57 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 7 May 2012 22:57:55 +0000 (22:57 +0000)
commitdefa0afa146f4c2370fe126b7860d6d57cf20909
tree04c6e7d4ac5458eb58cbe6b08f0a783a733111d8
parent7e56e92a33be7cc21a279e2fc6bd0e43833b1f18
Coalesce subreg-subreg copies.

At least some of them:

  %vreg1:sub_16bit = COPY %vreg2:sub_16bit; GR64:%vreg1, GR32: %vreg2

Previously, we couldn't figure out that the above copy could be
eliminated by coalescing %vreg2 with %vreg1:sub_32bit.

The new getCommonSuperRegClass() hook makes it possible.

This is not very useful yet since the unmodified part of the destination
register usually interferes with the source register. The coalescer
needs to understand sub-register interference checking first.

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