[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".
authorWei Mi <wmi@google.com>
Fri, 20 Jan 2017 17:38:54 +0000 (17:38 +0000)
committerWei Mi <wmi@google.com>
Fri, 20 Jan 2017 17:38:54 +0000 (17:38 +0000)
commitd5f7eebd42e14f3636393e39ede84d88fc5c0a75
treefba3324063900a27f6c800302c05cb779f1ebf61
parent06f125230fe284203c233c9d11b8ec640f8655d5
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".

The recommit fixes a bug related with live interval update after the partial
redundent copy is moved.

The original patch is to solve the performance problem described in PR27827.
Register coalescing sometimes cannot remove a copy because of interference.
But if we can find a reverse copy in one of the predecessor block of the copy,
the copy is partially redundent and we may remove the copy partially by moving
it to the predecessor block without the reverse copy.

Differential Revision: https://reviews.llvm.org/D28585

llvm-svn: 292621
llvm/lib/CodeGen/RegisterCoalescer.cpp
llvm/test/CodeGen/X86/pre-coalesce-2.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/pre-coalesce.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/pre-coalesce.mir [new file with mode: 0644]