hanchenye-llvm-project/llvm/test/Analysis/BranchProbabilityInfo
John Brawn 29bbed3613 [BPI] Detect branches in loops that make themselves not taken
If we have a loop like this:
 int n = 0;
 while (...) {
  if (++n >= MAX) {
    n = 0;
  }
 }
then the body of the 'if' statement will only be executed once every MAX
iterations. Detect this by looking for branches in loops where taking the branch
makes the branch condition evaluate to 'not taken' in the next iteration of the
loop, and reduce the probability of such branches.

This slightly improves EEMBC benchmarks on cortex-m4/cortex-m33 due to making
better choices in if-conversion, but has no effect on any other cpu/benchmark
that I could detect.

Differential Revision: https://reviews.llvm.org/D35804

llvm-svn: 325925
2018-02-23 17:17:31 +00:00
..
basic.ll
deopt-intrinsic.ll
libfunc_call.ll
loop.ll [BPI] Detect branches in loops that make themselves not taken 2018-02-23 17:17:31 +00:00
noreturn.ll
pr18705.ll
pr22718.ll