[PATCH] D30309: CodeGen: BlockPlacement: Precompute layout for chains of triangles.

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 12:47:54 PST 2017


iteratee created this revision.
Herald added a subscriber: nemanjai.

For chains of triangles with small join blocks that can be tail duplicated, a
simple calculation of probabilities is insufficient. We treat an unhinted branch
as 50/50, but it's more likely 60/40, with a bimodal distribution. Dominating
branches are also likely to be postively correlated. A suite of Google
benchmarks bear this out. Given those 2 facts, tail-duplicating when a chain of
2 or duplication opportunities follow each other with at least balanced branch
probabilities, can be profitable.


Repository:
  rL LLVM

https://reviews.llvm.org/D30309

Files:
  lib/CodeGen/MachineBlockPlacement.cpp
  test/CodeGen/Mips/llvm-ir/ashr.ll
  test/CodeGen/Mips/llvm-ir/lshr.ll
  test/CodeGen/Mips/llvm-ir/shl.ll
  test/CodeGen/PowerPC/tail-dup-layout.ll
  test/CodeGen/X86/cmovcmov.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30309.89550.patch
Type: text/x-patch
Size: 18212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170223/6514cefe/attachment.bin>


More information about the llvm-commits mailing list