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 | a9e8aa04822cb18c3ebd0ab49ce3237d7f7699ad (patch) | |
tree | 77189e8e6ea95ec4035bb959413b4dc07e4cb57a /llvm/lib/Support/BlockFrequency.cpp | |
parent | 107339e31ad1c41ca17f59ea6b971554163b2179 (diff) | |
download | bcm5719-llvm-a9e8aa04822cb18c3ebd0ab49ce3237d7f7699ad.tar.gz bcm5719-llvm-a9e8aa04822cb18c3ebd0ab49ce3237d7f7699ad.zip |
Move static methods to the anonymous namespace.
llvm-svn: 136221
Diffstat (limited to 'llvm/lib/Support/BlockFrequency.cpp')
-rw-r--r-- | llvm/lib/Support/BlockFrequency.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Support/BlockFrequency.cpp b/llvm/lib/Support/BlockFrequency.cpp index 87e1b2dba06..0bc78408104 100644 --- a/llvm/lib/Support/BlockFrequency.cpp +++ b/llvm/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(); |