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 | eec01ccbf9132a5c317dbfb7e297482b13fe8eed (patch) | |
tree | c4a6b0f26da3c859d15785384030f400fecb0bf9 /llvm/lib/Analysis/BranchProbabilityInfo.cpp | |
parent | dd475c39d72ff328a8978cac491d9bac74b34de1 (diff) | |
download | bcm5719-llvm-eec01ccbf9132a5c317dbfb7e297482b13fe8eed.tar.gz bcm5719-llvm-eec01ccbf9132a5c317dbfb7e297482b13fe8eed.zip |
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.
llvm-svn: 136428
Diffstat (limited to 'llvm/lib/Analysis/BranchProbabilityInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/BranchProbabilityInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp index 527a4ecbd88..0d0d132a649 100644 --- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp +++ b/llvm/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 |