llvm-mirror/test/Analysis/BranchProbabilityInfo
John Brawn b5f75330dd [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 [BPI] Reduce the probability of unreachable edge to minimal value greater than 0 2017-05-18 06:11:56 +00:00
deopt-intrinsic.ll [BPI] Reduce the probability of unreachable edge to minimal value greater than 0 2017-05-18 06:11:56 +00:00
libfunc_call.ll [BPI] Don't assume that strcmp returning >0 is more likely than <0 2017-06-08 09:44:40 +00:00
loop.ll [BPI] Detect branches in loops that make themselves not taken 2018-02-23 17:17:31 +00:00
noreturn.ll [BPI] Reduce the probability of unreachable edge to minimal value greater than 0 2017-05-18 06:11:56 +00:00
pr18705.ll [PM] Port Branch Probability Analysis pass to the new pass manager. 2016-05-05 02:59:57 +00:00
pr22718.ll [PM] Port Branch Probability Analysis pass to the new pass manager. 2016-05-05 02:59:57 +00:00