llvm-bcanalyzer.cpp (218885) | llvm-bcanalyzer.cpp (221337) |
---|---|
1//===-- llvm-bcanalyzer.cpp - Bitcode Analyzer --------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 457 unchanged lines hidden (view full) --- 466 } 467 468 break; 469 } 470 } 471} 472 473static void PrintSize(double Bits) { | 1//===-- llvm-bcanalyzer.cpp - Bitcode Analyzer --------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 457 unchanged lines hidden (view full) --- 466 } 467 468 break; 469 } 470 } 471} 472 473static void PrintSize(double Bits) { |
474 fprintf(stderr, "%.2f/%.2fB/%lluW", Bits, Bits/8,(unsigned long long)Bits/32); | 474 fprintf(stderr, "%.2f/%.2fB/%luW", Bits, Bits/8,(unsigned long)(Bits/32)); |
475} 476static void PrintSize(uint64_t Bits) { | 475} 476static void PrintSize(uint64_t Bits) { |
477 fprintf(stderr, "%llub/%.2fB/%lluW", (unsigned long long)Bits, 478 (double)Bits/8, (unsigned long long)Bits/32); | 477 fprintf(stderr, "%lub/%.2fB/%luW", (unsigned long)Bits, 478 (double)Bits/8, (unsigned long)(Bits/32)); |
479} 480 481 482/// AnalyzeBitcode - Analyze the bitcode file specified by InputFilename. 483static int AnalyzeBitcode() { 484 // Read the input file. 485 OwningPtr<MemoryBuffer> MemBuf; 486 --- 109 unchanged lines hidden (view full) --- 596 std::stable_sort(FreqPairs.begin(), FreqPairs.end()); 597 std::reverse(FreqPairs.begin(), FreqPairs.end()); 598 599 errs() << "\tRecord Histogram:\n"; 600 fprintf(stderr, "\t\t Count # Bits %% Abv Record Kind\n"); 601 for (unsigned i = 0, e = FreqPairs.size(); i != e; ++i) { 602 const PerRecordStats &RecStats = Stats.CodeFreq[FreqPairs[i].second]; 603 | 479} 480 481 482/// AnalyzeBitcode - Analyze the bitcode file specified by InputFilename. 483static int AnalyzeBitcode() { 484 // Read the input file. 485 OwningPtr<MemoryBuffer> MemBuf; 486 --- 109 unchanged lines hidden (view full) --- 596 std::stable_sort(FreqPairs.begin(), FreqPairs.end()); 597 std::reverse(FreqPairs.begin(), FreqPairs.end()); 598 599 errs() << "\tRecord Histogram:\n"; 600 fprintf(stderr, "\t\t Count # Bits %% Abv Record Kind\n"); 601 for (unsigned i = 0, e = FreqPairs.size(); i != e; ++i) { 602 const PerRecordStats &RecStats = Stats.CodeFreq[FreqPairs[i].second]; 603 |
604 fprintf(stderr, "\t\t%7d %9llu ", RecStats.NumInstances, 605 (unsigned long long)RecStats.TotalBits); | 604 fprintf(stderr, "\t\t%7d %9lu ", RecStats.NumInstances, 605 (unsigned long)RecStats.TotalBits); |
606 607 if (RecStats.NumAbbrev) 608 fprintf(stderr, "%7.2f ", 609 (double)RecStats.NumAbbrev/RecStats.NumInstances*100); 610 else 611 fprintf(stderr, " "); 612 613 if (const char *CodeName = --- 22 unchanged lines hidden --- | 606 607 if (RecStats.NumAbbrev) 608 fprintf(stderr, "%7.2f ", 609 (double)RecStats.NumAbbrev/RecStats.NumInstances*100); 610 else 611 fprintf(stderr, " "); 612 613 if (const char *CodeName = --- 22 unchanged lines hidden --- |