Move static methods to the anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakub Staszak 2011-07-27 15:51:51 +00:00
parent 9d9f765519
commit 636a02b57c
2 changed files with 7 additions and 5 deletions

View File

@ -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) { }

View File

@ -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();