1 //===-------------- lib/Support/BranchProbability.cpp -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements Branch Probability class.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/Support/BranchProbability.h"
15 #include "llvm/Support/Debug.h"
16 #include "llvm/Support/raw_ostream.h"
20 void BranchProbability::print(raw_ostream &OS) const {
21 OS << N << " / " << D << " = " << ((double)N / D);
24 void BranchProbability::dump() const {
31 raw_ostream &operator<<(raw_ostream &OS, const BranchProbability &Prob) {