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