[BPI] Look-up tables for non-loop branches. NFC.
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 18 Nov 2021 14:08:37 +0000 (14:08 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 22 Nov 2021 10:30:42 +0000 (10:30 +0000)
commit4d21b64464ac548ec8442bc0d2a7e984ba78bd88
tree2f79488c52118f7a04d1c9ff6d040f36dfedf188
parentd92aabc33666e83612c93e7c9c5c454510ba9b07
[BPI] Look-up tables for non-loop branches. NFC.

This adds and uses look-up tables for non-loop branch probabilities, which have
have probabilities directly encoded into the tables for the different condition
codes. Compared to having this logic inlined in different functions, as it used
to be the case, I think this is compacter and thus also easier to check/cross
reference. This also adds a test for pointer heuristics that was missing.

Differential Revision: https://reviews.llvm.org/D114009
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/test/Analysis/BranchProbabilityInfo/pointer_heuristics.ll [new file with mode: 0644]