llvm-project/llvm/test/Transforms/LoopPredication
Anna Thomas 9b1176b0ef [LoopPredication] Add profitability check based on BPI
Summary:
LoopPredication is not profitable when the loop is known to always exit
through some block other than the latch block.
A coarse grained latch check can cause loop predication to predicate the
loop, and unconditionally deoptimize.

However, without predicating the loop, the guard may never fail within the
loop during the dynamic execution because the non-latch loop termination
condition exits the loop before the latch condition causes the loop to
exit.
We teach LP about this using BranchProfileInfo pass.

Reviewers: apilipenko, skatkov, mkazantsev, reames

Reviewed by: skatkov

Subscribers: llvm-commits

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

llvm-svn: 328210
2018-03-22 16:03:59 +00:00
..
basic.ll [LoopPredication] Handle the case when the guard and the latch IV have different offsets 2017-10-27 14:46:17 +00:00
nested.ll [LoopPredication] Check whether the loop is already guarded by the first iteration check condition 2017-10-12 21:21:17 +00:00
profitability.ll [LoopPredication] Add profitability check based on BPI 2018-03-22 16:03:59 +00:00
reverse.ll [Loop Predication] Teach LP about reverse loops with uge and sge latch conditions 2018-02-08 10:34:08 +00:00
visited.ll [LoopPredication] Check whether the loop is already guarded by the first iteration check condition 2017-10-12 21:21:17 +00:00
widened.ll [LoopPredication] Enable predication when latchCheckIV is wider than rangeCheck 2017-11-02 21:21:02 +00:00