OSDN Git Service

[AArch64] Add pass to remove redundant copy after RA
authorJun Bum Lim <junbuml@codeaurora.org>
Tue, 16 Feb 2016 20:02:39 +0000 (20:02 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Tue, 16 Feb 2016 20:02:39 +0000 (20:02 +0000)
commit092f8a3228f9f70a979d8303ea943f785d725167
tree51aa9d1ab7b4042c721e2dab8363031f3bfd658c
parent0dca440c42a0399a8d04103717d0b1cad3490cc2
[AArch64] Add pass to remove redundant copy after RA

Summary:
This change will add a pass to remove unnecessary zero copies in target blocks
of cbz/cbnz instructions. E.g., the copy instruction in the code below can be
removed because the cbz jumps to BB1 when x0 is zero :
  BB0:
    cbz x0, .BB1
  BB1:
    mov x0, xzr

Jun

Reviewers: gberry, jmolloy, HaoLiu, MatzeB, mcrosier

Subscribers: mcrosier, mssimpso, haicheng, bmakam, llvm-commits, aemerson, rengolin

Differential Revision: http://reviews.llvm.org/D16203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261004 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64.h
lib/Target/AArch64/AArch64RedundantCopyElimination.cpp [new file with mode: 0644]
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/AArch64/CMakeLists.txt
test/CodeGen/AArch64/machine-copy-remove.ll [new file with mode: 0644]