diff options
author | Jakub Staszak <jstaszak@apple.com> | 2011-07-27 15:51:51 +0000 |
---|---|---|
committer | Jakub Staszak <jstaszak@apple.com> | 2011-07-27 15:51:51 +0000 |
commit | 636a02b57c3ade2eb528bda31f05556f42aa7d48 (patch) | |
tree | 9e7b9027ac04adebd1f5c7f4f19c486ed96d8aa0 /lib/Support/BlockFrequency.cpp | |
parent | 9d9f76551977e57dc765f691be6411bc3edd0361 (diff) |
Move static methods to the anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/BlockFrequency.cpp')
-rw-r--r-- | lib/Support/BlockFrequency.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Support/BlockFrequency.cpp b/lib/Support/BlockFrequency.cpp index 87e1b2dba0..0bc7840810 100644 --- a/lib/Support/BlockFrequency.cpp +++ b/lib/Support/BlockFrequency.cpp @@ -18,8 +18,10 @@ using namespace llvm; +namespace { + /// mult96bit - Multiply FREQ by N and store result in W array. -void BlockFrequency::mult96bit(uint64_t freq, uint32_t N, uint64_t W[2]) { +void mult96bit(uint64_t freq, uint32_t N, uint64_t W[2]) { uint64_t u0 = freq & UINT32_MAX; uint64_t u1 = freq >> 32; @@ -41,7 +43,7 @@ void BlockFrequency::mult96bit(uint64_t freq, uint32_t N, uint64_t W[2]) { /// div96bit - Divide 96-bit value stored in W array by D. Return 64-bit frequency. -uint64_t BlockFrequency::div96bit(uint64_t W[2], uint32_t D) { +uint64_t div96bit(uint64_t W[2], uint32_t D) { uint64_t y = W[0]; uint64_t x = W[1]; @@ -58,6 +60,9 @@ uint64_t BlockFrequency::div96bit(uint64_t W[2], uint32_t D) { return y; } +} + + BlockFrequency &BlockFrequency::operator*=(const BranchProbability &Prob) { uint32_t n = Prob.getNumerator(); uint32_t d = Prob.getDenominator(); |