summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-29 16:31:29 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-29 16:31:29 +0000
commit07f96126af8dc4b6a2081d55ebcca2d113528cf3 (patch)
tree2913507dfb67a00f3e6dfbb322d2ddf869279843 /include/llvm
parent18f4763a081b4b4f9c843bc9cc513f5b5254ca3c (diff)
downloadllvm-07f96126af8dc4b6a2081d55ebcca2d113528cf3.tar.gz
llvm-07f96126af8dc4b6a2081d55ebcca2d113528cf3.tar.bz2
llvm-07f96126af8dc4b6a2081d55ebcca2d113528cf3.tar.xz
blockfreq: Defer to BranchProbability::scale() (again)
Change `BlockFrequency` to defer to `BranchProbability::scale()` and `BranchProbability::scaleByInverse()`. This removes `BlockFrequency::scale()` from its API (and drops the ability to see the remainder), but the only user was the unit tests. If some code in the future needs an API that exposes the remainder, we can add something to `BranchProbability`, but I find that unlikely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Support/BlockFrequency.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/llvm/Support/BlockFrequency.h b/include/llvm/Support/BlockFrequency.h
index dae520b54e..4304a253b2 100644
--- a/include/llvm/Support/BlockFrequency.h
+++ b/include/llvm/Support/BlockFrequency.h
@@ -23,14 +23,8 @@ class BranchProbability;
// This class represents Block Frequency as a 64-bit value.
class BlockFrequency {
-
uint64_t Frequency;
- /// \brief Scale the given BlockFrequency by N/D. Return the remainder from
- /// the division by D. Upon overflow, the routine will saturate and
- /// additionally will return the remainder set to D.
- uint32_t scale(uint32_t N, uint32_t D);
-
public:
BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { }
@@ -58,10 +52,6 @@ public:
/// \brief Shift block frequency to the right by count digits saturating to 1.
BlockFrequency &operator>>=(const unsigned count);
- /// \brief Scale the given BlockFrequency by N/D. Return the remainder from
- /// the division by D. Upon overflow, the routine will saturate.
- uint32_t scale(const BranchProbability &Prob);
-
bool operator<(const BlockFrequency &RHS) const {
return Frequency < RHS.Frequency;
}