aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/BranchProbability.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2021-03-21 19:55:21 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2021-03-21 22:50:21 +0300
commit37d6be90524ca1659521ab879aaae5e5501f1e97 (patch)
tree7addf65a1fc1e3d51b27f9f943846482f941c766 /llvm/lib/Support/BranchProbability.cpp
parentbcaca360f8b64d267c787a5f3088e73420e78f53 (diff)
downloadllvm-37d6be90524ca1659521ab879aaae5e5501f1e97.zip
llvm-37d6be90524ca1659521ab879aaae5e5501f1e97.tar.gz
llvm-37d6be90524ca1659521ab879aaae5e5501f1e97.tar.bz2
Revert "[BranchProbability] move options for 'likely' and 'unlikely'"
Upon reviewing D98898 i've come to realization that these are implementation detail of LowerExpectIntrinsicPass, and they should not be exposed to outside of it. This reverts commit ee8b53815ddf6f6f94ade0068903cd5ae843fafa.
Diffstat (limited to 'llvm/lib/Support/BranchProbability.cpp')
-rw-r--r--llvm/lib/Support/BranchProbability.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Support/BranchProbability.cpp b/llvm/lib/Support/BranchProbability.cpp
index d93d9cf..60d5478 100644
--- a/llvm/lib/Support/BranchProbability.cpp
+++ b/llvm/lib/Support/BranchProbability.cpp
@@ -19,20 +19,6 @@
using namespace llvm;
-// These default values are chosen to represent an extremely skewed outcome for
-// a condition, but they leave some room for interpretation by later passes.
-//
-// If the documentation for __builtin_expect() was made explicit that it should
-// only be used in extreme cases, we could make this ratio higher. As it stands,
-// programmers may be using __builtin_expect() / llvm.expect to annotate that a
-// branch is only mildly likely or unlikely to be taken.
-cl::opt<uint32_t> llvm::LikelyBranchWeight(
- "likely-branch-weight", cl::Hidden, cl::init(2000),
- cl::desc("Weight of the branch likely to be taken (default = 2000)"));
-cl::opt<uint32_t> llvm::UnlikelyBranchWeight(
- "unlikely-branch-weight", cl::Hidden, cl::init(1),
- cl::desc("Weight of the branch unlikely to be taken (default = 1)"));
-
constexpr uint32_t BranchProbability::D;
raw_ostream &BranchProbability::print(raw_ostream &OS) const {