aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Staszak <jstaszak@apple.com>2011-07-27 15:51:51 +0000
committerJakub Staszak <jstaszak@apple.com>2011-07-27 15:51:51 +0000
commit636a02b57c3ade2eb528bda31f05556f42aa7d48 (patch)
tree9e7b9027ac04adebd1f5c7f4f19c486ed96d8aa0
parent9d9f76551977e57dc765f691be6411bc3edd0361 (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
-rw-r--r--include/llvm/Support/BlockFrequency.h3
-rw-r--r--lib/Support/BlockFrequency.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/Support/BlockFrequency.h b/include/llvm/Support/BlockFrequency.h
index b133c961f6..36aca807f7 100644
--- a/include/llvm/Support/BlockFrequency.h
+++ b/include/llvm/Support/BlockFrequency.h
@@ -24,9 +24,6 @@ class BlockFrequency {
uint64_t Frequency;
- static void mult96bit(uint64_t freq, uint32_t N, uint64_t W[2]);
- static uint64_t div96bit(uint64_t W[2], uint32_t D);
-
public:
BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { }
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();