diff options
author | Jakub Staszak <jstaszak@apple.com> | 2011-07-28 23:42:08 +0000 |
---|---|---|
committer | Jakub Staszak <jstaszak@apple.com> | 2011-07-28 23:42:08 +0000 |
commit | 3d8b15ea709ec7fc84e6de191d4eb9858b0b4edf (patch) | |
tree | 88e19c78371b5908e7c66a795b1d74caadaf6d80 /lib/Analysis/BranchProbabilityInfo.cpp | |
parent | 48c693ff564c422153733424ab845106161430ac (diff) |
Change LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum of
LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce
number of rounding errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BranchProbabilityInfo.cpp')
-rw-r--r-- | lib/Analysis/BranchProbabilityInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/BranchProbabilityInfo.cpp b/lib/Analysis/BranchProbabilityInfo.cpp index 527a4ecbd8..0d0d132a64 100644 --- a/lib/Analysis/BranchProbabilityInfo.cpp +++ b/lib/Analysis/BranchProbabilityInfo.cpp @@ -52,7 +52,7 @@ class BranchProbabilityAnalysis { // V // BB1<-+ // | | - // | | (Weight = 128) + // | | (Weight = 124) // V | // BB2--+ // | @@ -60,10 +60,10 @@ class BranchProbabilityAnalysis { // V // BB3 // - // Probability of the edge BB2->BB1 = 128 / (128 + 4) = 0.9696.. - // Probability of the edge BB2->BB3 = 4 / (128 + 4) = 0.0303.. + // Probability of the edge BB2->BB1 = 124 / (124 + 4) = 0.96875 + // Probability of the edge BB2->BB3 = 4 / (124 + 4) = 0.03125 - static const uint32_t LBH_TAKEN_WEIGHT = 128; + static const uint32_t LBH_TAKEN_WEIGHT = 124; static const uint32_t LBH_NONTAKEN_WEIGHT = 4; // Standard weight value. Used when none of the heuristics set weight for |