[PATCH] D39385: [BranchProbabilityInfo] Handle irreducible loops.

Geoff Berry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 11:08:05 PDT 2017


gberry marked an inline comment as done.
gberry added a comment.

In https://reviews.llvm.org/D39385#910489, @fhahn wrote:

> This looks sensible to me. Do you have any numbers about the impact of this change? Not sure about the compile time impact of computing the SCC here (computing SCC should not be too expensive, O(N+E)), but at least BlockFrequencyInfoImpl uses SCC for a similar thing but it is only computed once it discovers irreducible control flow. It might be worth having this as a separate analysis to do the construction only once in the future.


I observed the following performance improvements on AArch64 (Falkor):

  spec2017/xz:train             1.00
  spec2006/bzip2:lessnoise      7.24

As for compile time, the times for BPI do increase, but the increases are in the noise of the compile time as a whole.  I looked briefly at adding irreducible loop detection to LoopInfo, so I could check that here before computing SCCs (see FIXME comment around line 820), but it didn't seem simple enough to justify the effort given the level of compile time increase.


https://reviews.llvm.org/D39385





More information about the llvm-commits mailing list