OSDN Git Service

[BPI] Apply invoke heuristic before loop branch heuristic
authorArtur Pilipenko <apilipenko@azulsystems.com>
Fri, 8 Jun 2018 13:03:21 +0000 (13:03 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Fri, 8 Jun 2018 13:03:21 +0000 (13:03 +0000)
commit3ff0fb06516df6d0c54016fab1a48ae53c81e4b5
tree8a268bb5343568f101a3eb46ba1acd8bbb9477cf
parent1ec02551591ac6a3da2143ce642c80c76b14891b
[BPI] Apply invoke heuristic before loop branch heuristic

Currently the loop branch heuristic is applied before the invoke heuristic which makes us overestimate the probability of the unwind destination of invokes inside loops. This in turn makes us grossly underestimate the frequencies of loops with invokes.

Reviewed By: skatkov, vsk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334285 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BranchProbabilityInfo.cpp
test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll [new file with mode: 0644]
test/Analysis/BranchProbabilityInfo/loop.ll