]> granicus.if.org Git - llvm/commit
[RegisterCoalescing] Remove partial redundent copy.
authorWei Mi <wmi@google.com>
Tue, 17 Jan 2017 23:39:07 +0000 (23:39 +0000)
committerWei Mi <wmi@google.com>
Tue, 17 Jan 2017 23:39:07 +0000 (23:39 +0000)
commitcaab16e99af7086019ca24983b78ac59e8091169
treed79bafc7af100cfe20b76dc575f05c8742a02cf0
parent84b54a19945d9790367c1b813426e84df9fb2b29
[RegisterCoalescing] Remove partial redundent copy.

The 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292292 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp
test/CodeGen/X86/pre-coalesce.ll [new file with mode: 0644]
test/CodeGen/X86/pre-coalesce.mir [new file with mode: 0644]