[PATCH] D33577: CodeGen: BlockPlacement: Use Branching factor to choose between near equals.

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 10:46:28 PDT 2017


iteratee added a comment.

I think you counted wrong. The dynamic taken branch count is the same. But the distribution of the taken branch count is more consistent.

In the example test, the default layout gives:

0 taken: 1/2
1 taken: 1/4
2 taken: 1/8
3 taken: 1/16
4 taken: 1/16

For an average of 15/16.

The layout with this heuristic gives:
0 taken: 1/16
1 taken: 15/16

For the same average, but a much more consistent distribution.


Repository:
  rL LLVM

https://reviews.llvm.org/D33577





More information about the llvm-commits mailing list