[PATCH] D67794: [MachineCopyPropagation] Extend MCP to do trivial copy backward propagation

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 22:21:58 PDT 2019


lkail created this revision.
lkail added reviewers: gberry, MatzeB, bogner, eli.friedman, junbuml, thegameg, stoklund, RKSimon, hfinkel.
Herald added subscribers: llvm-commits, wuzish, MaskRay, hiraditya, nemanjai.
Herald added a project: LLVM.

This patch mainly do such transformation

  $R0 = OP ...
  ... // No read/clobber of $R0 and $R1
  $R1 = COPY $R0 // $R0 is killed Replace $R0 with $R1 and remove the COPY
  $R1 = OP ...

This transformation can also expose more opportunities for existing copy elimination in MCP.


Repository:
  rL LLVM

https://reviews.llvm.org/D67794

Files:
  llvm/lib/CodeGen/MachineCopyPropagation.cpp
  llvm/test/CodeGen/PowerPC/machine-backward-cp.mir
  llvm/test/CodeGen/PowerPC/redundant-copy-after-tail-dup.ll
  llvm/test/CodeGen/X86/fp128-i128.ll
  llvm/test/CodeGen/X86/fshr.ll
  llvm/test/CodeGen/X86/i128-mul.ll
  llvm/test/CodeGen/X86/mul-i512.ll
  llvm/test/CodeGen/X86/shift-i128.ll
  llvm/test/CodeGen/X86/umulo-128-legalisation-lowering.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67794.220946.patch
Type: text/x-patch
Size: 17702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/f27016d4/attachment.bin>


More information about the llvm-commits mailing list