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

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeDist.h

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
OLDNEW
1 //===- NaClBitcodeDist.h ---------------------------------------*- C++ -*-===// 1 //===- NaClBitcodeDist.h ---------------------------------------*- C++ -*-===//
2 // Maps distributions of values in PNaCl bitcode files. 2 // Maps distributions of values in PNaCl bitcode files.
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 virtual void AddRecord(const NaClBitcodeRecord &Record); 305 virtual void AddRecord(const NaClBitcodeRecord &Record);
306 306
307 /// Adds the BlockID of the given bitcode block to the distribution 307 /// Adds the BlockID of the given bitcode block to the distribution
308 /// map, if applicable (based on the value of method UseBlockID). 308 /// map, if applicable (based on the value of method UseBlockID).
309 /// Note: Requires that GetStorageKind() == BlockStorage. 309 /// Note: Requires that GetStorageKind() == BlockStorage.
310 virtual void AddBlock(const NaClBitcodeBlock &Block); 310 virtual void AddBlock(const NaClBitcodeBlock &Block);
311 311
312 /// Builds the distribution associated with the distribution map. 312 /// Builds the distribution associated with the distribution map.
313 /// Warning: The distribution is cached, and hence, only valid while 313 /// Warning: The distribution is cached, and hence, only valid while
314 /// it's contents is not changed. 314 /// it's contents is not changed.
315 Distribution *GetDistribution() const { 315 const Distribution *GetDistribution() const {
316 if (CachedDistribution == 0) Sort(); 316 if (CachedDistribution == 0) Sort();
317 return CachedDistribution; 317 return CachedDistribution;
318 } 318 }
319 319
320 /// Prints out the contents of the distribution map to Stream. 320 /// Prints out the contents of the distribution map to Stream.
321 void Print(raw_ostream &Stream, const std::string &Indent) const; 321 void Print(raw_ostream &Stream, const std::string &Indent) const;
322 322
323 void Print(raw_ostream &Stream) const { 323 void Print(raw_ostream &Stream) const {
324 std::string Indent; 324 std::string Indent;
325 Print(Stream, Indent); 325 Print(Stream, Indent);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 GetElement(NaClBitcodeDistValue Value) { 498 GetElement(NaClBitcodeDistValue Value) {
499 if (TableMap.find(Value) == TableMap.end()) { 499 if (TableMap.find(Value) == TableMap.end()) {
500 TableMap[Value] = CreateElement(Value); 500 TableMap[Value] = CreateElement(Value);
501 } 501 }
502 return TableMap[Value]; 502 return TableMap[Value];
503 } 503 }
504 504
505 } 505 }
506 506
507 #endif 507 #endif
OLDNEW
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeAbbrevDist.h ('k') | include/llvm/Bitcode/NaCl/NaClCompressCodeDist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698