[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)
commitb389d9b9af204a5891a0e1c4f077ca8fca231890
tree28c58627d27b50aa041871b02df9ed8558c0be00
parentba2a01645b54020f6f852edddd1e40d3a096e093
[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

llvm-svn: 261004
llvm/lib/Target/AArch64/AArch64.h
llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp [new file with mode: 0644]
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/CMakeLists.txt
llvm/test/CodeGen/AArch64/machine-copy-remove.ll [new file with mode: 0644]