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

Side by Side Diff: lib/Bitcode/NaCl/Reader/NaClBitcodeDist.cpp

Issue 154603002: Make pnacl-bccompress add abbreviations for obvious constants. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Fixs nits associated with Patch Set 4. Created 6 years, 10 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
« no previous file with comments | « lib/Bitcode/NaCl/Reader/NaClBitCodes.cpp ('k') | tools/pnacl-bccompress/pnacl-bccompress.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- NaClBitcodeDist.cpp --------------------------------------*- C++ -*-===// 1 //===- NaClBitcodeDist.cpp --------------------------------------*- C++ -*-===//
2 // Internal implementation of PNaCl bitcode distributions. 2 // Internal implementation of PNaCl bitcode distributions.
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is distributed under the University of Illinois Open Source 6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details. 7 // License. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return; 53 return;
54 RemoveCachedDistribution(); 54 RemoveCachedDistribution();
55 ++Total; 55 ++Total;
56 unsigned BlockID = Block.GetBlockID(); 56 unsigned BlockID = Block.GetBlockID();
57 NaClBitcodeDistElement *Element = GetElement(BlockID); 57 NaClBitcodeDistElement *Element = GetElement(BlockID);
58 Element->AddBlock(Block); 58 Element->AddBlock(Block);
59 } 59 }
60 60
61 void NaClBitcodeDist::Print(raw_ostream &Stream, 61 void NaClBitcodeDist::Print(raw_ostream &Stream,
62 const std::string &Indent) const { 62 const std::string &Indent) const {
63 Distribution *Dist = GetDistribution(); 63 const Distribution *Dist = GetDistribution();
64 Stream << Indent; 64 Stream << Indent;
65 Sentinel->PrintTitle(Stream, this); 65 Sentinel->PrintTitle(Stream, this);
66 Stream << Indent; 66 Stream << Indent;
67 Sentinel->PrintHeader(Stream); 67 Sentinel->PrintHeader(Stream);
68 Stream << "\n"; 68 Stream << "\n";
69 bool NeedsHeader = false; 69 bool NeedsHeader = false;
70 for (size_t I = 0, E = Dist->size(); I < E; ++I) { 70 for (size_t I = 0, E = Dist->size(); I < E; ++I) {
71 if (NeedsHeader) { 71 if (NeedsHeader) {
72 // Reprint the header so that rows are more readable. 72 // Reprint the header so that rows are more readable.
73 Stream << Indent << " " << Sentinel->GetTitle() << " (continued)\n"; 73 Stream << Indent << " " << Sentinel->GetTitle() << " (continued)\n";
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 PrintedNestedDists = true; 195 PrintedNestedDists = true;
196 Stream << "\n"; 196 Stream << "\n";
197 } 197 }
198 Dist->Print(Stream, Indent + " "); 198 Dist->Print(Stream, Indent + " ");
199 Stream << "\n"; 199 Stream << "\n";
200 } 200 }
201 } 201 }
202 } 202 }
203 return PrintedNestedDists; 203 return PrintedNestedDists;
204 } 204 }
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Reader/NaClBitCodes.cpp ('k') | tools/pnacl-bccompress/pnacl-bccompress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698