[PATCH] D21455: MachineCopyPropagation: Add full copy propagation mode

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 18:00:59 PDT 2016


MatzeB created this revision.
MatzeB added subscribers: llvm-commits, jonpa.
MatzeB set the repository for this revision to rL LLVM.
Herald added a subscriber: mcrosier.

Disclaimer: This turned out to be pretty much a copy of Jonas Paulsons patch http://reviews.llvm.org/D20531 just with a different motivation / comments... Uploading for reference.

By default MachineCopyPropagation only removes copies between values
that are identical anyway. This patch adds support for the classical
variant of copy propagation which transforms uses of a register:
    %x = COPY %y
       use %x
is transformed to:
    %x = COPY %y
       use %y

The transformation improves dependencies and gives the post register
allocation scheduler more freedom. It may also be better for out of
order execution engines that do not track copies.

The mode is opt-in because some targets have additional rules making
some register renames invalid.

Repository:
  rL LLVM

http://reviews.llvm.org/D21455

Files:
  include/llvm/Target/TargetSubtargetInfo.h
  lib/CodeGen/MachineCopyPropagation.cpp
  lib/Target/AArch64/AArch64Subtarget.h
  lib/Target/ARM/ARMSubtarget.h
  lib/Target/X86/X86Subtarget.h
  test/CodeGen/AArch64/f16-instructions.ll
  test/CodeGen/AArch64/flags-multiuse.ll
  test/CodeGen/AArch64/merge-store.ll
  test/CodeGen/AArch64/neg-imm.ll
  test/CodeGen/ARM/atomic-op.ll
  test/CodeGen/ARM/swifterror.ll
  test/CodeGen/Thumb/thumb-shrink-wrapping.ll
  test/CodeGen/X86/avx512-bugfix-25270.ll
  test/CodeGen/X86/avx512-calling-conv.ll
  test/CodeGen/X86/fp128-i128.ll
  test/CodeGen/X86/localescape.ll
  test/CodeGen/X86/mul128.ll
  test/CodeGen/X86/pmul.ll
  test/CodeGen/X86/pr11415.ll
  test/CodeGen/X86/shrink-wrap-chkstk.ll
  test/CodeGen/X86/vec_int_to_fp.ll
  test/CodeGen/X86/vec_minmax_sint.ll
  test/CodeGen/X86/vector-blend.ll
  test/CodeGen/X86/vector-sext.ll
  test/CodeGen/X86/vector-zext.ll
  test/CodeGen/X86/vselect-minmax.ll
  test/CodeGen/X86/x86-shrink-wrap-unwind.ll
  test/CodeGen/X86/x86-shrink-wrapping.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21455.61053.patch
Type: text/x-patch
Size: 28394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160617/ebe74e5b/attachment.bin>


More information about the llvm-commits mailing list