#include "llvm/Support/BranchProbability.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cmath>
usingnamespacellvm;
constexpr uint32_t BranchProbability::D;
raw_ostream &BranchProbability::print(raw_ostream &OS) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
#endif
BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) { … }
BranchProbability
BranchProbability::getBranchProbability(uint64_t Numerator,
uint64_t Denominator) { … }
template <uint32_t ConstD>
static uint64_t scale(uint64_t Num, uint32_t N, uint32_t D) { … }
uint64_t BranchProbability::scale(uint64_t Num) const { … }
uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { … }