diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-15 19:40:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-15 19:40:31 +0000 |
commit | 0bc0f1d8de46d20fe94ed59d70c01bddc0cd4997 (patch) | |
tree | 104d91721241cab0588b530d4f4cb03c9f21ea6b /llvm/lib/Bytecode/Reader | |
parent | cf809786dcc7b1fa07fb9f612046d31bea84cf34 (diff) | |
download | bcm5719-llvm-0bc0f1d8de46d20fe94ed59d70c01bddc0cd4997.tar.gz bcm5719-llvm-0bc0f1d8de46d20fe94ed59d70c01bddc0cd4997.zip |
Don't print a bunch of metrics that are meaningless for external functions
llvm-svn: 17017
Diffstat (limited to 'llvm/lib/Bytecode/Reader')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Analyzer.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/llvm/lib/Bytecode/Reader/Analyzer.cpp b/llvm/lib/Bytecode/Reader/Analyzer.cpp index 73f2e4eee69..5738f1a733d 100644 --- a/llvm/lib/Bytecode/Reader/Analyzer.cpp +++ b/llvm/lib/Bytecode/Reader/Analyzer.cpp @@ -693,25 +693,28 @@ void PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out ) bca.FunctionInfo.end(); while ( I != E ) { - Out << std::left << std::setw(0); - Out << "\nFunction: " << I->second.name << "\n"; + Out << std::left << std::setw(0) << "\n"; + if (I->second.numBasicBlocks == 0) Out << "External "; + Out << "Function: " << I->second.name << "\n"; print(Out, "Type:", I->second.description); print(Out, "Byte Size", I->second.byteSize); - print(Out, "Basic Blocks", I->second.numBasicBlocks); - print(Out, "Instructions", I->second.numInstructions); - print(Out, "Long Instructions", I->second.longInstructions); - print(Out, "Operands", I->second.numOperands); - print(Out, "Instruction Size", I->second.instructionSize); - print(Out, "Average Instruction Size", - double(I->second.instructionSize)/double(I->second.numInstructions)); - print(Out, "Bytes Per Instruction", I->second.density); - print(Out, "# of VBR 32-bit Integers", I->second.vbrCount32); - print(Out, "# of VBR 64-bit Integers", I->second.vbrCount64); - print(Out, "# of VBR Compressed Bytes", I->second.vbrCompBytes); - print(Out, "# of VBR Expanded Bytes", I->second.vbrExpdBytes); - print(Out, "Bytes Saved With VBR", - double(I->second.vbrExpdBytes)-double(I->second.vbrCompBytes), - double(I->second.vbrExpdBytes)); + if (I->second.numBasicBlocks) { + print(Out, "Basic Blocks", I->second.numBasicBlocks); + print(Out, "Instructions", I->second.numInstructions); + print(Out, "Long Instructions", I->second.longInstructions); + print(Out, "Operands", I->second.numOperands); + print(Out, "Instruction Size", I->second.instructionSize); + print(Out, "Average Instruction Size", + double(I->second.instructionSize) / I->second.numInstructions); + print(Out, "Bytes Per Instruction", I->second.density); + print(Out, "# of VBR 32-bit Integers", I->second.vbrCount32); + print(Out, "# of VBR 64-bit Integers", I->second.vbrCount64); + print(Out, "# of VBR Compressed Bytes", I->second.vbrCompBytes); + print(Out, "# of VBR Expanded Bytes", I->second.vbrExpdBytes); + print(Out, "Bytes Saved With VBR", + double(I->second.vbrExpdBytes) - I->second.vbrCompBytes), + double(I->second.vbrExpdBytes); + } ++I; } } |