summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-06-15 03:03:30 +0000
committerXinliang David Li <davidxl@google.com>2016-06-15 03:03:30 +0000
commite34ed833e50c279e2f25ce944404d3091ade5190 (patch)
treefefa41d621972f0515d7356ad548c3ca36ea61de /llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
parent89049702ce6c979355dbcb8945364289599af9e2 (diff)
downloadbcm5719-llvm-e34ed833e50c279e2f25ce944404d3091ade5190.tar.gz
bcm5719-llvm-e34ed833e50c279e2f25ce944404d3091ade5190.zip
[MBP] add comments and bug fix
Document the new parameter and threshod computation model. Also fix a bug when the threshold parameter is set to be different from the default. llvm-svn: 272749
Diffstat (limited to 'llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
index 9e14cb621dd..fe734061837 100644
--- a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
@@ -24,15 +24,16 @@ INITIALIZE_PASS_BEGIN(MachineBranchProbabilityInfo, "machine-branch-prob",
INITIALIZE_PASS_END(MachineBranchProbabilityInfo, "machine-branch-prob",
"Machine Branch Probability Analysis", false, true)
-cl::opt<unsigned> StaticLikelyProb(
- "static-likely-prob",
- cl::desc("branch probability threshold to be considered very likely"),
- cl::init(80), cl::Hidden);
+cl::opt<unsigned>
+ StaticLikelyProb("static-likely-prob",
+ cl::desc("branch probability threshold in percentage"
+ "to be considered very likely"),
+ cl::init(80), cl::Hidden);
cl::opt<unsigned> ProfileLikelyProb(
"profile-likely-prob",
- cl::desc("branch probability threshold to be considered very likely "
- "when profile is available"),
+ cl::desc("branch probability threshold in percentage to be considered"
+ " very likely when profile is available"),
cl::init(51), cl::Hidden);
char MachineBranchProbabilityInfo::ID = 0;
OpenPOWER on IntegriCloud