diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-06-11 15:10:38 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-06-11 15:10:38 +0000 |
commit | c0999e134ed75e8833d8204a8712001ac80ccd41 (patch) | |
tree | f0b5abb63e259fb231978352510f69510bb82c17 /llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp | |
parent | 80ae844ea87333c06c351faf5920da9533df801e (diff) | |
download | bcm5719-llvm-c0999e134ed75e8833d8204a8712001ac80ccd41.tar.gz bcm5719-llvm-c0999e134ed75e8833d8204a8712001ac80ccd41.zip |
Implement tracking of bytecode instruction size and the number of long
instructions generated.
llvm-svn: 14154
Diffstat (limited to 'llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp b/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp index 9591dce6fb9..f8493170fa4 100644 --- a/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp +++ b/llvm/lib/Bytecode/Reader/AnalyzerWrappers.cpp @@ -249,6 +249,10 @@ void llvm::PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out ) print(Out, "Number Of Operands", bca.numOperands); print(Out, "Number Of Compaction Tables", bca.numCmpctnTables); print(Out, "Number Of Symbol Tables", bca.numSymTab); + print(Out, "Long Instructions", bca.longInstructions); + print(Out, "Instruction Size", bca.instructionSize); + print(Out, "Average Instruction Size", + double(bca.instructionSize)/double(bca.numInstructions)); print(Out, "Maximum Type Slot Number", bca.maxTypeSlot); print(Out, "Maximum Value Slot Number", bca.maxValueSlot); print(Out, "Bytes Thrown To Alignment", double(bca.numAlignment), @@ -304,6 +308,10 @@ void llvm::PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out ) print(Out, "Type:", I->second.description); print(Out, "Byte Size", I->second.byteSize); print(Out, "Instructions", I->second.numInstructions); + print(Out, "Long Instructions", I->second.longInstructions); + print(Out, "Instruction Size", I->second.instructionSize); + print(Out, "Average Instruction Size", + double(I->second.instructionSize)/double(I->second.numInstructions)); print(Out, "Basic Blocks", I->second.numBasicBlocks); print(Out, "Operand", I->second.numOperands); print(Out, "Function Density", I->second.density); |