[llvm-commits] CVS: llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp
LLVM
llvm at cs.uiuc.edu
Wed Jun 9 01:23:03 PDT 2004
Changes in directory llvm/lib/Bytecode/Analyzer:
AnalyzerWrappers.cpp updated: 1.1 -> 1.2
---
Log message:
Implement analysis output. Don't dump function details unless requested.
---
Diffs of the changes: (+20 -1)
Index: llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp
diff -u llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp:1.1 llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp:1.2
--- llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp:1.1 Mon Jun 7 12:53:43 2004
+++ llvm/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp Wed Jun 9 01:17:58 2004
@@ -202,7 +202,26 @@
/// @brief Print BytecodeAnalysis structure to an ostream
void llvm::PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out )
{
- Out << "Not Implemented Yet.\n";
+ Out << "Bytecode Analysis of " << bca.ModuleId << "\n";
+ Out << " File Size:" << bca.byteSize << "\n";
+ Out << " Number Of Types:" << bca.numTypes << "\n";
+ Out << " Number Of Constants:" << bca.numConstants << "\n";
+ Out << " Number Of Global Variables:" << bca.numGlobalVars << "\n";
+ Out << " Number Of Functions:" << bca.numFunctions << "\n";
+ Out << " Number Of Basic Blocks:" << bca.numBasicBlocks << "\n";
+ Out << " Number Of Instructions:" << bca.numInstructions << "\n";
+ Out << " Number Of Operands:" << bca.numOperands << "\n";
+ Out << "Number Of Compaction Tables:" << bca.numCmpctnTables << "\n";
+ Out << " Number Of Symbol Tables:" << bca.numSymTab << "\n";
+ Out << " Maximum Type Slot Number:" << bca.maxTypeSlot << "\n";
+ Out << " Maximum Value Slot Number:" << bca.maxValueSlot << "\n";
+ Out << " Bytecode Density:" << bca.density << "\n";
+
+ if ( bca.detailedResults )
+ Out << "Detailed Results Not Implemented Yet.\n";
+
+ if ( bca.dumpBytecode )
+ Out << bca.BytecodeDump;
}
// vim: sw=2
More information about the llvm-commits
mailing list