diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-01 02:43:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-01 02:43:46 +0000 |
commit | 8f92668f530d5d866a29ef45523fb7e13c92fa1a (patch) | |
tree | 73bfef263aad635420c87418d3ede84cf71d84a9 /tools/llvm-bcanalyzer | |
parent | be1f993f2d1d064de4451cb6d049304a3314d5c6 (diff) | |
download | external_llvm-8f92668f530d5d866a29ef45523fb7e13c92fa1a.zip external_llvm-8f92668f530d5d866a29ef45523fb7e13c92fa1a.tar.gz external_llvm-8f92668f530d5d866a29ef45523fb7e13c92fa1a.tar.bz2 |
add phi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-bcanalyzer')
-rw-r--r-- | tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index 118da11..97ea8e6 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -167,6 +167,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID) { case bitc::FUNC_CODE_INST_UNWIND: return "INST_UNWIND"; case bitc::FUNC_CODE_INST_UNREACHABLE: return "INST_UNREACHABLE"; + case bitc::FUNC_CODE_INST_PHI: return "INST_PHI"; case bitc::FUNC_CODE_INST_MALLOC: return "INST_MALLOC"; case bitc::FUNC_CODE_INST_FREE: return "INST_FREE"; case bitc::FUNC_CODE_INST_ALLOCA: return "INST_ALLOCA"; @@ -371,10 +372,11 @@ static int AnalyzeBitcode() { if (Dump) std::cerr << "\n\n"; + uint64_t BufferSizeBits = Buffer->getBufferSize()*8; // Print a summary of the read file. std::cerr << "Summary of " << InputFilename << ":\n"; std::cerr << " Total size: "; - PrintSize(Buffer->getBufferSize()*8); + PrintSize(BufferSizeBits); std::cerr << "\n"; std::cerr << " Stream type: "; switch (CurStreamType) { @@ -402,6 +404,8 @@ static int AnalyzeBitcode() { std::cerr << " Average Size: "; PrintSize(Stats.NumBits/(double)Stats.NumInstances); std::cerr << "\n"; + std::cerr << " % of file: " + << Stats.NumBits/(double)BufferSizeBits*100 << "\n"; std::cerr << " Tot/Avg SubBlocks: " << Stats.NumSubBlocks << "/" << Stats.NumSubBlocks/(double)Stats.NumInstances << "\n"; std::cerr << " Tot/Avg Abbrevs: " << Stats.NumAbbrevs << "/" |