diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-06-09 06:17:58 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-06-09 06:17:58 +0000 |
commit | edc3b582ae2e1e26ff1b16f03f82ce47422df088 (patch) | |
tree | c6cfccf91266385f4cc3b3880602b8f3b9eb99f9 /lib/Bytecode | |
parent | 649ee57b1de4f0a5dab86aea8cb4e4ebca12f8f8 (diff) | |
download | external_llvm-edc3b582ae2e1e26ff1b16f03f82ce47422df088.zip external_llvm-edc3b582ae2e1e26ff1b16f03f82ce47422df088.tar.gz external_llvm-edc3b582ae2e1e26ff1b16f03f82ce47422df088.tar.bz2 |
Implement analysis output. Don't dump function details unless requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Analyzer/AnalyzerWrappers.cpp | 21 | ||||
-rw-r--r-- | lib/Bytecode/Reader/AnalyzerWrappers.cpp | 21 |
2 files changed, 40 insertions, 2 deletions
diff --git a/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp b/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp index a0e4845..2a221bf 100644 --- a/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp +++ b/lib/Bytecode/Analyzer/AnalyzerWrappers.cpp @@ -202,7 +202,26 @@ void llvm::AnalyzeBytecodeBuffer( /// @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 diff --git a/lib/Bytecode/Reader/AnalyzerWrappers.cpp b/lib/Bytecode/Reader/AnalyzerWrappers.cpp index a0e4845..2a221bf 100644 --- a/lib/Bytecode/Reader/AnalyzerWrappers.cpp +++ b/lib/Bytecode/Reader/AnalyzerWrappers.cpp @@ -202,7 +202,26 @@ void llvm::AnalyzeBytecodeBuffer( /// @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 |