]> granicus.if.org Git - llvm/commit
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".
authorQuentin Colombet <qcolombet@apple.com>
Sat, 28 Jan 2017 01:05:27 +0000 (01:05 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Sat, 28 Jan 2017 01:05:27 +0000 (01:05 +0000)
commitf294f578dcc8865d6fbf41165050b474c3d250f6
tree14952afe4c66f779aa70f90356e0936f7bf3489d
parentdd95f6162d7841350d8991f4f122c47a7bcc15cc
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".

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

This recommit solves an additional bug related to the lack of update of
subranges.

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

Re-apply r292621

Revert "Revert rL292621. Caused some internal build bot failures in apple."

This reverts commit r292984.

Original patch: Wei Mi <wmi@google.com>
Subrange fix: Mostly Matthias Braun <matze@braunis.de>

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