[PATCH] D64376: [MBP] Avoid tail duplication if it can't bring benefit

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 16:02:30 PDT 2019


Carrot updated this revision to Diff 209359.
Carrot added a comment.

Add a simple CFG example to show the inefficient tail duplication.

For our biggest object file which is actually generated from a protocol buffer, the file size is reduced by 1.2%.

It also increased the performance of our important internal benchmark.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64376/new/

https://reviews.llvm.org/D64376

Files:
  lib/CodeGen/MachineBlockPlacement.cpp
  test/CodeGen/AArch64/swifterror.ll
  test/CodeGen/AArch64/tbz-tbnz.ll
  test/CodeGen/AMDGPU/uniform-cfg.ll
  test/CodeGen/PowerPC/branch-opt.ll
  test/CodeGen/PowerPC/expand-contiguous-isel.ll
  test/CodeGen/PowerPC/no-duplicate.ll
  test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll
  test/CodeGen/Thumb2/cbnz.ll
  test/CodeGen/X86/mmx-coalescing.ll
  test/CodeGen/X86/pr38795.ll
  test/CodeGen/X86/ragreedy-hoist-spill.ll
  test/CodeGen/X86/reverse_branches.ll
  test/CodeGen/X86/shadow-stack.ll
  test/CodeGen/X86/speculative-load-hardening.ll
  test/CodeGen/X86/tail-dup-merge-loop-headers.ll
  test/CodeGen/X86/tail-dup-repeat.ll
  test/CodeGen/X86/tail-merge-after-mbp.mir
  test/CodeGen/X86/tail-opts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64376.209359.patch
Type: text/x-patch
Size: 37836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/76c6d181/attachment.bin>


More information about the llvm-commits mailing list