Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: lib/Bitcode/NaCl/Analysis/NaClBitcodeBitsDist.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //===- NaClBitcodeBitsDist.cpp ----------------------------------*- C++ -*-===//
2 // Implements distributions of values with the corresponding number
3 // of bits in PNaCl bitcode.
4 //
5 // The LLVM Compiler Infrastructure
6 //
7 // This file is distributed under the University of Illinois Open Source
8 // License. See LICENSE.TXT for details.
9 //
10 //===----------------------------------------------------------------------===//
11
12 #include "llvm/Bitcode/NaCl/NaClBitcodeBitsDist.h"
13
14 using namespace llvm;
15
16 NaClBitcodeBitsDistElement::~NaClBitcodeBitsDistElement() {}
17
18 void NaClBitcodeBitsDistElement::AddRecord(const NaClBitcodeRecord &Record) {
19 NaClBitcodeDistElement::AddRecord(Record);
20 TotalBits += Record.GetNumBits();
21 }
22
23 void NaClBitcodeBitsDistElement::AddBlock(const NaClBitcodeBlock &Block) {
24 NaClBitcodeDistElement::AddBlock(Block);
25 TotalBits += Block.GetLocalNumBits();
26 }
27
28 void NaClBitcodeBitsDistElement::PrintStatsHeader(raw_ostream &Stream) const {
29 NaClBitcodeDistElement::PrintStatsHeader(Stream);
30 Stream << " # Bits Bits/Elmt";
31 }
32
33 void NaClBitcodeBitsDistElement::
34 PrintRowStats(raw_ostream &Stream,
35 const NaClBitcodeDist *Distribution) const {
36 NaClBitcodeDistElement::PrintRowStats(Stream, Distribution);
37 Stream << format(" %9lu %12.2f",
38 (unsigned long) GetTotalBits(),
39 (double) GetTotalBits()/GetNumInstances());
40 }
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClBitcodeBitsAndAbbrevsDist.cpp ('k') | lib/Bitcode/NaCl/Analysis/NaClBitcodeBlockDist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698