summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-06-10 22:00:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-06-10 22:00:54 +0000
commit7670bbdfb957c37c86050ab89a858bf837d1db1a (patch)
tree7af31fae8f6074cdb82085773c73b12ccc6592af /llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp
parent90f00326647f13f89ad5841220c785176eabcc62 (diff)
downloadbcm5719-llvm-7670bbdfb957c37c86050ab89a858bf837d1db1a.tar.gz
bcm5719-llvm-7670bbdfb957c37c86050ab89a858bf837d1db1a.zip
Implement detailed function level data collection and reporting.
llvm-svn: 14122
Diffstat (limited to 'llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp b/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp
index fd23dc80867..a3cf9f5413f 100644
--- a/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp
+++ b/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp
@@ -293,21 +293,27 @@ void llvm::PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out )
double(bca.BlockSizes[BytecodeFormat::CompactionTable]),
double(bca.byteSize));
- std::map<unsigned,BytecodeAnalysis::BytecodeFunctionInfo>::iterator I =
+ std::map<const Function*,BytecodeAnalysis::BytecodeFunctionInfo>::iterator I =
bca.FunctionInfo.begin();
- std::map<unsigned,BytecodeAnalysis::BytecodeFunctionInfo>::iterator E =
+ std::map<const Function*,BytecodeAnalysis::BytecodeFunctionInfo>::iterator E =
bca.FunctionInfo.end();
while ( I != E ) {
Out << std::left << std::setw(0);
- Out << "Function: " << I->second.name << " Slot=" << I->first << "\n";
- print(Out,"Type:", I->second.description);
- print(Out,"Byte Size", I->second.byteSize);
- print(Out,"Instructions", I->second.numInstructions);
- print(Out,"Basic Blocks", I->second.numBasicBlocks);
- print(Out,"Operand", I->second.numOperands);
- print(Out,"Function Density", I->second.density);
- print(Out,"VBR Effectiveness", I->second.vbrEffectiveness);
+ Out << "Function: " << I->second.name << "\n";
+ print(Out, "Type:", I->second.description);
+ print(Out, "Byte Size", I->second.byteSize);
+ print(Out, "Instructions", I->second.numInstructions);
+ print(Out, "Basic Blocks", I->second.numBasicBlocks);
+ print(Out, "Operand", I->second.numOperands);
+ print(Out, "Function Density", I->second.density);
+ print(Out, "Number of VBR 32-bit Integers", I->second.vbrCount32);
+ print(Out, "Number of VBR 64-bit Integers", I->second.vbrCount64);
+ print(Out, "Number of VBR Compressed Bytes", I->second.vbrCompBytes);
+ print(Out, "Number of VBR Expanded Bytes", I->second.vbrExpdBytes);
+ print(Out, "VBR Savings",
+ double(I->second.vbrExpdBytes)-double(I->second.vbrCompBytes),
+ double(I->second.byteSize));
++I;
}
}
OpenPOWER on IntegriCloud