Merge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
[oota-llvm.git] / lib / Bytecode / Reader / Analyzer.cpp
1 //===-- Analyzer.cpp - Analysis and Dumping of Bytecode 000000---*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Reid Spencer and is distributed under the 
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 //  This file implements the AnalyzerHandler class and PrintBytecodeAnalysis
11 //  function which together comprise the basic functionality of the llmv-abcd
12 //  tool. The AnalyzerHandler collects information about the bytecode file into
13 //  the BytecodeAnalysis structure. The PrintBytecodeAnalysis function prints
14 //  out the content of that structure.
15 //  @see include/llvm/Bytecode/Analysis.h
16 //
17 //===----------------------------------------------------------------------===//
18
19 #include "Reader.h"
20 #include "llvm/Constants.h"
21 #include "llvm/DerivedTypes.h"
22 #include "llvm/Module.h"
23 #include "llvm/Analysis/Verifier.h"
24 #include "llvm/Bytecode/Analyzer.h"
25 #include "llvm/Bytecode/BytecodeHandler.h"
26 #include <iomanip>
27 #include <sstream>
28
29 using namespace llvm;
30
31 namespace {
32
33 /// @brief Bytecode reading handler for analyzing bytecode.
34 class AnalyzerHandler : public BytecodeHandler {
35   BytecodeAnalysis& bca;     ///< The structure in which data is recorded
36   std::ostringstream dump;   ///< A convenience for dumping data.
37   /// @brief Keeps track of current function
38   BytecodeAnalysis::BytecodeFunctionInfo* currFunc; 
39   Module* M; ///< Keeps track of current module
40
41 /// @name Constructor
42 /// @{
43 public:
44   /// The only way to construct an AnalyzerHandler. All that is needed is a
45   /// reference to the BytecodeAnalysis structure where the output will be
46   /// placed.
47   AnalyzerHandler(BytecodeAnalysis& TheBca) 
48     : bca(TheBca) 
49     , dump()
50     , currFunc(0)
51     { }  
52
53 /// @}
54 /// @name BytecodeHandler Implementations
55 /// @{
56 public:
57   virtual void handleError(const std::string& str ) { 
58     dump << "ERROR: " << str << "\n";
59     bca.BytecodeDump = dump.str() ;
60   }
61
62   virtual void handleStart( Module* Mod, unsigned theSize ) {
63     M = Mod;
64     dump << "Bytecode {\n";
65     bca.byteSize = theSize;
66     bca.ModuleId.clear();
67     bca.numBlocks = 0;
68     bca.numTypes = 0;
69     bca.numValues = 0;
70     bca.numFunctions = 0;
71     bca.numConstants = 0;
72     bca.numGlobalVars = 0;
73     bca.numInstructions = 0;
74     bca.numBasicBlocks = 0;
75     bca.numOperands = 0;
76     bca.numCmpctnTables = 0;
77     bca.numSymTab = 0;
78     bca.maxTypeSlot = 0;
79     bca.maxValueSlot = 0;
80     bca.numAlignment = 0;
81     bca.fileDensity = 0.0;
82     bca.globalsDensity = 0.0;
83     bca.functionDensity = 0.0;
84     bca.instructionSize = 0;
85     bca.longInstructions = 0;
86     bca.vbrCount32 = 0;
87     bca.vbrCount64 = 0;
88     bca.vbrCompBytes = 0;
89     bca.vbrExpdBytes = 0;
90     bca.FunctionInfo.clear();
91     bca.BytecodeDump.clear();
92     bca.BlockSizes[BytecodeFormat::Module] = 0;
93     bca.BlockSizes[BytecodeFormat::Function] = 0;
94     bca.BlockSizes[BytecodeFormat::ConstantPool] = 0;
95     bca.BlockSizes[BytecodeFormat::SymbolTable] = 0;
96     bca.BlockSizes[BytecodeFormat::ModuleGlobalInfo] = 0;
97     bca.BlockSizes[BytecodeFormat::GlobalTypePlane] = 0;
98     bca.BlockSizes[BytecodeFormat::BasicBlock] = 0;
99     bca.BlockSizes[BytecodeFormat::InstructionList] = 0;
100     bca.BlockSizes[BytecodeFormat::CompactionTable] = 0;
101   }
102
103   virtual void handleFinish() {
104     dump << "} End Bytecode\n"; 
105     bca.BytecodeDump = dump.str() ;
106
107     bca.fileDensity = double(bca.byteSize) / double( bca.numTypes + bca.numValues );
108     double globalSize = 0.0;
109     globalSize += double(bca.BlockSizes[BytecodeFormat::ConstantPool]);
110     globalSize += double(bca.BlockSizes[BytecodeFormat::ModuleGlobalInfo]);
111     globalSize += double(bca.BlockSizes[BytecodeFormat::GlobalTypePlane]);
112     bca.globalsDensity = globalSize / double( bca.numTypes + bca.numConstants + 
113       bca.numGlobalVars );
114     bca.functionDensity = double(bca.BlockSizes[BytecodeFormat::Function]) / 
115       double(bca.numFunctions);
116
117     if ( bca.progressiveVerify ) {
118       try {
119         verifyModule(*M, ThrowExceptionAction);
120       } catch ( std::string& msg ) {
121         bca.VerifyInfo += "Verify@Finish: " + msg + "\n";
122       }
123     }
124   }
125
126   virtual void handleModuleBegin(const std::string& id) {
127     dump << "  Module " << id << " {\n";
128     bca.ModuleId = id;
129   }
130
131   virtual void handleModuleEnd(const std::string& id) { 
132     dump << "  } End Module " << id << "\n";
133     if ( bca.progressiveVerify ) {
134       try {
135         verifyModule(*M, ThrowExceptionAction);
136       } catch ( std::string& msg ) {
137         bca.VerifyInfo += "Verify@EndModule: " + msg + "\n";
138       }
139     }
140   }
141
142   virtual void handleVersionInfo(
143     unsigned char RevisionNum,        ///< Byte code revision number
144     Module::Endianness Endianness,    ///< Endianness indicator
145     Module::PointerSize PointerSize   ///< PointerSize indicator
146   ) { 
147     dump << "    RevisionNum: " << int(RevisionNum) 
148          << " Endianness: " << Endianness
149          << " PointerSize: " << PointerSize << "\n";
150   }
151
152   virtual void handleModuleGlobalsBegin() { 
153     dump << "    BLOCK: ModuleGlobalInfo {\n";
154   }
155
156   virtual void handleGlobalVariable( 
157     const Type* ElemType,     
158     bool isConstant,          
159     GlobalValue::LinkageTypes Linkage,
160     unsigned SlotNum,
161     unsigned initSlot
162   ) {
163     bca.numGlobalVars++;
164     bca.numValues++;
165
166     dump << "      GV: "
167          << ( initSlot == 0 ? "Uni" : "I" ) << "nitialized, "
168          << ( isConstant? "Constant, " : "Variable, ")
169          << " Linkage=" << Linkage << " Type=" 
170          << ElemType->getDescription() 
171          << " Slot=" << SlotNum << " InitSlot=" << initSlot 
172          << "\n";
173   }
174
175   virtual void handleType( const Type* Ty ) { 
176     bca.numTypes++; 
177     dump << "      Type: " << Ty->getDescription() << "\n";
178   }
179
180   virtual void handleFunctionDeclaration( 
181     Function* Func          ///< The function
182   ) {
183     bca.numFunctions++;
184     bca.numValues++;
185     dump << "      Function Decl: " << Func->getType()->getDescription() << "\n";
186   }
187
188   virtual void handleGlobalInitializer(GlobalVariable* GV, Constant* CV) {
189     dump << "      Initializer: GV=";
190     GV->print(dump);
191     dump << " CV=";
192     CV->print(dump);
193     dump << "\n";
194   }
195
196   virtual void handleModuleGlobalsEnd() { 
197     dump << "    } END BLOCK: ModuleGlobalInfo\n";
198     if ( bca.progressiveVerify ) {
199       try {
200         verifyModule(*M, ThrowExceptionAction);
201       } catch ( std::string& msg ) {
202         bca.VerifyInfo += "Verify@EndModuleGlobalInfo: " + msg + "\n";
203       }
204     }
205   }
206
207   virtual void handleCompactionTableBegin() { 
208     dump << "    BLOCK: CompactionTable {\n";
209   }
210
211   virtual void handleCompactionTablePlane( unsigned Ty, unsigned NumEntries) {
212     bca.numCmpctnTables++;
213     dump << "      Plane: Ty=" << Ty << " Size=" << NumEntries << "\n";
214   }
215
216   virtual void handleCompactionTableType( unsigned i, unsigned TypSlot, 
217       const Type* Ty ) {
218     dump << "        Type: " << i << " Slot:" << TypSlot 
219               << " is " << Ty->getDescription() << "\n"; 
220   }
221
222   virtual void handleCompactionTableValue( 
223     unsigned i, 
224     unsigned TypSlot,
225     unsigned ValSlot, 
226     const Type* Ty ) { 
227     dump << "        Value: " << i << " TypSlot: " << TypSlot 
228          << " ValSlot:" << ValSlot << " is " << Ty->getDescription() 
229          << "\n";
230   }
231
232   virtual void handleCompactionTableEnd() { 
233     dump << "    } END BLOCK: CompactionTable\n";
234   }
235
236   virtual void handleSymbolTableBegin(Function* CF, SymbolTable* ST) { 
237     bca.numSymTab++; 
238     dump << "    BLOCK: SymbolTable {\n";
239   }
240
241   virtual void handleSymbolTablePlane(unsigned Ty, unsigned NumEntries, 
242     const Type* Typ) { 
243     dump << "      Plane: Ty=" << Ty << " Size=" << NumEntries
244          << " Type: " << Typ->getDescription() << "\n"; 
245   }
246
247   virtual void handleSymbolTableType(unsigned i, unsigned slot, 
248     const std::string& name ) { 
249     dump << "        Type " << i << " Slot=" << slot
250               << " Name: " << name << "\n"; 
251   }
252
253   virtual void handleSymbolTableValue(unsigned i, unsigned slot, 
254     const std::string& name ) { 
255     dump << "        Value " << i << " Slot=" << slot
256               << " Name: " << name << "\n";
257   }
258
259   virtual void handleSymbolTableEnd() { 
260     dump << "    } END BLOCK: SymbolTable\n";
261   }
262
263   virtual void handleFunctionBegin(Function* Func, unsigned Size) {
264     dump << "BLOCK: Function {\n";
265     dump << "  Linkage: " << Func->getLinkage() << "\n";
266     dump << "  Type: " << Func->getType()->getDescription() << "\n";
267     const FunctionType* FType = 
268       cast<FunctionType>(Func->getType()->getElementType());
269     currFunc = &bca.FunctionInfo[Func];
270     currFunc->description = FType->getDescription();
271     currFunc->name = Func->getName();
272     currFunc->byteSize = Size;
273     currFunc->numInstructions = 0;
274     currFunc->numBasicBlocks = 0;
275     currFunc->numPhis = 0;
276     currFunc->numOperands = 0;
277     currFunc->density = 0.0;
278     currFunc->instructionSize = 0;
279     currFunc->longInstructions = 0;
280     currFunc->vbrCount32 = 0;
281     currFunc->vbrCount64 = 0;
282     currFunc->vbrCompBytes = 0;
283     currFunc->vbrExpdBytes = 0;
284
285   }
286
287   virtual void handleFunctionEnd( Function* Func) {
288     dump << "} END BLOCK: Function\n";
289     currFunc->density = double(currFunc->byteSize) /
290       double(currFunc->numInstructions+currFunc->numBasicBlocks);
291
292     if ( bca.progressiveVerify ) {
293       try {
294         verifyModule(*M, ThrowExceptionAction);
295       } catch ( std::string& msg ) {
296         bca.VerifyInfo += "Verify@EndFunction: " + msg + "\n";
297       }
298     }
299   }
300
301   virtual void handleBasicBlockBegin( unsigned blocknum) {
302     dump << "  BLOCK: BasicBlock #" << blocknum << "{\n";
303     bca.numBasicBlocks++;
304     bca.numValues++;
305     if ( currFunc ) currFunc->numBasicBlocks++;
306   }
307
308   virtual bool handleInstruction( unsigned Opcode, const Type* iType, 
309                                 std::vector<unsigned>& Operands, unsigned Size){
310     dump << "    INST: OpCode=" 
311          << Instruction::getOpcodeName(Opcode) << " Type=" 
312          << iType->getDescription() << "\n";
313     for ( unsigned i = 0; i < Operands.size(); ++i ) 
314       dump << "      Op#" << i << " Slot=" << Operands[i] << "\n";
315
316     bca.numInstructions++;
317     bca.numValues++;
318     bca.instructionSize += Size;
319     if (Size > 4 ) bca.longInstructions++;
320     bca.numOperands += Operands.size();
321     if ( currFunc ) {
322       currFunc->numInstructions++;
323       currFunc->instructionSize += Size;
324       if (Size > 4 ) currFunc->longInstructions++;
325       if ( Opcode == Instruction::PHI ) currFunc->numPhis++;
326     }
327     return Instruction::isTerminator(Opcode); 
328   }
329
330   virtual void handleBasicBlockEnd(unsigned blocknum) { 
331     dump << "  } END BLOCK: BasicBlock #" << blocknum << "{\n";
332   }
333
334   virtual void handleGlobalConstantsBegin() { 
335     dump << "    BLOCK: GlobalConstants {\n";
336   }
337
338   virtual void handleConstantExpression( unsigned Opcode, 
339       std::vector<Constant*> ArgVec, Constant* C ) {
340     dump << "      EXPR: " << Instruction::getOpcodeName(Opcode) << "\n";
341     for ( unsigned i = 0; i < ArgVec.size(); ++i )  {
342       dump << "        Arg#" << i << " "; ArgVec[i]->print(dump); dump << "\n";
343     }
344     dump << "        Value=";
345     C->print(dump);
346     dump << "\n";
347     bca.numConstants++;
348     bca.numValues++;
349   }
350
351   virtual void handleConstantValue( Constant * c ) {
352     dump << "      VALUE: ";
353     c->print(dump);
354     dump << "\n";
355     bca.numConstants++;
356     bca.numValues++;
357   }
358
359   virtual void handleConstantArray( const ArrayType* AT, 
360           std::vector<Constant*>& Elements,
361           unsigned TypeSlot,
362           Constant* ArrayVal ) {
363     dump << "      ARRAY: " << AT->getDescription() 
364          << " TypeSlot=" << TypeSlot << "\n";
365     for ( unsigned i = 0; i < Elements.size(); ++i ) {
366       dump << "        #" << i;
367       Elements[i]->print(dump);
368       dump << "\n";
369     }
370     dump << "        Value=";
371     ArrayVal->print(dump);
372     dump << "\n";
373
374     bca.numConstants++;
375     bca.numValues++;
376   }
377
378   virtual void handleConstantStruct(
379         const StructType* ST,
380         std::vector<Constant*>& Elements,
381         Constant* StructVal)
382   {
383     dump << "      STRUC: " << ST->getDescription() << "\n";
384     for ( unsigned i = 0; i < Elements.size(); ++i ) {
385       dump << "        #" << i << " "; Elements[i]->print(dump); dump << "\n";
386     }
387     dump << "        Value=";
388     StructVal->print(dump);
389     dump << "\n";
390     bca.numConstants++;
391     bca.numValues++;
392   }
393
394   virtual void handleConstantPointer( const PointerType* PT, 
395       unsigned Slot, GlobalValue* GV, Constant* PtrVal) {
396     dump << "       PNTR: " << PT->getDescription() 
397          << " Slot=" << Slot << " GlobalValue=";
398     GV->print(dump);
399     dump << "\n        Value=";
400     PtrVal->print(dump);
401     dump << "\n";
402     bca.numConstants++;
403     bca.numValues++;
404   }
405
406   virtual void handleConstantString( const ConstantArray* CA ) {
407     dump << "      STRNG: ";
408     CA->print(dump); 
409     dump << "\n";
410     bca.numConstants++;
411     bca.numValues++;
412   }
413
414   virtual void handleGlobalConstantsEnd() { 
415     dump << "    } END BLOCK: GlobalConstants\n";
416     if ( bca.progressiveVerify ) {
417       try {
418         verifyModule(*M, ThrowExceptionAction);
419       } catch ( std::string& msg ) {
420         bca.VerifyInfo += "Verify@EndGlobalConstants: " + msg + "\n";
421       }
422     }
423   }
424
425   virtual void handleAlignment(unsigned numBytes) {
426     bca.numAlignment += numBytes;
427   }
428
429   virtual void handleBlock(
430     unsigned BType, const unsigned char* StartPtr, unsigned Size) {
431     bca.numBlocks++;
432     bca.BlockSizes[llvm::BytecodeFormat::FileBlockIDs(BType)] += Size;
433   }
434
435   virtual void handleVBR32(unsigned Size ) {
436     bca.vbrCount32++;
437     bca.vbrCompBytes += Size;
438     bca.vbrExpdBytes += sizeof(uint32_t);
439     if (currFunc) {
440       currFunc->vbrCount32++;
441       currFunc->vbrCompBytes += Size;
442       currFunc->vbrExpdBytes += sizeof(uint32_t);
443     }
444   }
445
446   virtual void handleVBR64(unsigned Size ) {
447     bca.vbrCount64++;
448     bca.vbrCompBytes += Size;
449     bca.vbrExpdBytes += sizeof(uint64_t);
450     if ( currFunc ) {
451       currFunc->vbrCount64++;
452       currFunc->vbrCompBytes += Size;
453       currFunc->vbrExpdBytes += sizeof(uint64_t);
454     }
455   }
456 };
457
458
459 /// @brief Utility for printing a titled unsigned value with
460 /// an aligned colon.
461 inline static void print(std::ostream& Out, const char*title, 
462   unsigned val, bool nl = true ) {
463   Out << std::setw(30) << std::right << title 
464       << std::setw(0) << ": "
465       << std::setw(9) << val << "\n";
466 }
467
468 /// @brief Utility for printing a titled double value with an
469 /// aligned colon
470 inline static void print(std::ostream&Out, const char*title, 
471   double val ) {
472   Out << std::setw(30) << std::right << title 
473       << std::setw(0) << ": "
474       << std::setw(9) << std::setprecision(6) << val << "\n" ;
475 }
476
477 /// @brief Utility for printing a titled double value with a
478 /// percentage and aligned colon.
479 inline static void print(std::ostream&Out, const char*title, 
480   double top, double bot ) {
481   Out << std::setw(30) << std::right << title 
482       << std::setw(0) << ": "
483       << std::setw(9) << std::setprecision(6) << top 
484       << " (" << std::left << std::setw(0) << std::setprecision(4) 
485       << (top/bot)*100.0 << "%)\n";
486 }
487
488 /// @brief Utility for printing a titled string value with
489 /// an aligned colon.
490 inline static void print(std::ostream&Out, const char*title, 
491   std::string val, bool nl = true) {
492   Out << std::setw(30) << std::right << title 
493       << std::setw(0) << ": "
494       << std::left << val << (nl ? "\n" : "");
495 }
496
497 }
498
499 namespace llvm {
500
501 /// This function prints the contents of rhe BytecodeAnalysis structure in
502 /// a human legible form.
503 /// @brief Print BytecodeAnalysis structure to an ostream
504 void PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out )
505 {
506   print(Out, "Bytecode Analysis Of Module",     bca.ModuleId);
507   print(Out, "File Size",                       bca.byteSize);
508   print(Out, "Bytecode Compression Index",std::string("TBD"));
509   print(Out, "Number Of Bytecode Blocks",       bca.numBlocks);
510   print(Out, "Number Of Types",                 bca.numTypes);
511   print(Out, "Number Of Values",                bca.numValues);
512   print(Out, "Number Of Constants",             bca.numConstants);
513   print(Out, "Number Of Global Variables",      bca.numGlobalVars);
514   print(Out, "Number Of Functions",             bca.numFunctions);
515   print(Out, "Number Of Basic Blocks",          bca.numBasicBlocks);
516   print(Out, "Number Of Instructions",          bca.numInstructions);
517   print(Out, "Number Of Operands",              bca.numOperands);
518   print(Out, "Number Of Compaction Tables",     bca.numCmpctnTables);
519   print(Out, "Number Of Symbol Tables",         bca.numSymTab);
520   print(Out, "Long Instructions", bca.longInstructions);
521   print(Out, "Instruction Size", bca.instructionSize);
522   print(Out, "Average Instruction Size", 
523     double(bca.instructionSize)/double(bca.numInstructions));
524   print(Out, "Maximum Type Slot Number",        bca.maxTypeSlot);
525   print(Out, "Maximum Value Slot Number",       bca.maxValueSlot);
526   print(Out, "Bytes Thrown To Alignment",       double(bca.numAlignment), 
527     double(bca.byteSize));
528   print(Out, "File Density (bytes/def)",        bca.fileDensity);
529   print(Out, "Globals Density (bytes/def)",     bca.globalsDensity);
530   print(Out, "Function Density (bytes/func)",   bca.functionDensity);
531   print(Out, "Number of VBR 32-bit Integers",   bca.vbrCount32);
532   print(Out, "Number of VBR 64-bit Integers",   bca.vbrCount64);
533   print(Out, "Number of VBR Compressed Bytes",  bca.vbrCompBytes);
534   print(Out, "Number of VBR Expanded Bytes",    bca.vbrExpdBytes);
535   print(Out, "VBR Savings", 
536     double(bca.vbrExpdBytes)-double(bca.vbrCompBytes),
537     double(bca.byteSize));
538
539   if ( bca.detailedResults ) {
540     print(Out, "Module Bytes",
541         double(bca.BlockSizes[BytecodeFormat::Module]),
542         double(bca.byteSize));
543     print(Out, "Function Bytes", 
544         double(bca.BlockSizes[BytecodeFormat::Function]),
545         double(bca.byteSize));
546     print(Out, "Constant Pool Bytes", 
547         double(bca.BlockSizes[BytecodeFormat::ConstantPool]),
548         double(bca.byteSize));
549     print(Out, "Symbol Table Bytes", 
550         double(bca.BlockSizes[BytecodeFormat::SymbolTable]),
551         double(bca.byteSize));
552     print(Out, "Module Global Info Bytes", 
553         double(bca.BlockSizes[BytecodeFormat::ModuleGlobalInfo]),
554         double(bca.byteSize));
555     print(Out, "Global Type Plane Bytes", 
556         double(bca.BlockSizes[BytecodeFormat::GlobalTypePlane]),
557         double(bca.byteSize));
558     print(Out, "Basic Block Bytes", 
559         double(bca.BlockSizes[BytecodeFormat::BasicBlock]),
560         double(bca.byteSize));
561     print(Out, "Instruction List Bytes", 
562         double(bca.BlockSizes[BytecodeFormat::InstructionList]),
563         double(bca.byteSize));
564     print(Out, "Compaction Table Bytes", 
565         double(bca.BlockSizes[BytecodeFormat::CompactionTable]),
566         double(bca.byteSize));
567
568     std::map<const Function*,BytecodeAnalysis::BytecodeFunctionInfo>::iterator I = 
569       bca.FunctionInfo.begin();
570     std::map<const Function*,BytecodeAnalysis::BytecodeFunctionInfo>::iterator E = 
571       bca.FunctionInfo.end();
572
573     while ( I != E ) {
574       Out << std::left << std::setw(0);
575       Out << "Function: " << I->second.name << "\n";
576       print(Out, "Type:", I->second.description);
577       print(Out, "Byte Size", I->second.byteSize);
578       print(Out, "Instructions", I->second.numInstructions);
579       print(Out, "Long Instructions", I->second.longInstructions);
580       print(Out, "Instruction Size", I->second.instructionSize);
581       print(Out, "Average Instruction Size", 
582         double(I->second.instructionSize)/double(I->second.numInstructions));
583       print(Out, "Basic Blocks", I->second.numBasicBlocks);
584       print(Out, "Operand", I->second.numOperands);
585       print(Out, "Function Density", I->second.density);
586       print(Out, "Number of VBR 32-bit Integers",   I->second.vbrCount32);
587       print(Out, "Number of VBR 64-bit Integers",   I->second.vbrCount64);
588       print(Out, "Number of VBR Compressed Bytes",  I->second.vbrCompBytes);
589       print(Out, "Number of VBR Expanded Bytes",    I->second.vbrExpdBytes);
590       print(Out, "VBR Savings", 
591         double(I->second.vbrExpdBytes)-double(I->second.vbrCompBytes),
592         double(I->second.byteSize));
593       ++I;
594     }
595   }
596
597   if ( bca.dumpBytecode )
598     Out << bca.BytecodeDump;
599
600   if ( bca.progressiveVerify )
601     Out << bca.VerifyInfo;
602 }
603
604 BytecodeHandler* createBytecodeAnalyzerHandler(BytecodeAnalysis& bca)
605 {
606   return new AnalyzerHandler(bca);
607 }
608
609 }
610
611 // vim: sw=2