Add support to describe template value parameter in debug info.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.h
1 //===-- llvm/CodeGen/DwarfDebug.h - Dwarf Debug Framework ------*- C++ -*--===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains support for writing dwarf debug info into asm files.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef CODEGEN_ASMPRINTER_DWARFDEBUG_H__
15 #define CODEGEN_ASMPRINTER_DWARFDEBUG_H__
16
17 #include "llvm/CodeGen/AsmPrinter.h"
18 #include "llvm/CodeGen/MachineLocation.h"
19 #include "DIE.h"
20 #include "llvm/ADT/DenseMap.h"
21 #include "llvm/ADT/FoldingSet.h"
22 #include "llvm/ADT/SmallPtrSet.h"
23 #include "llvm/ADT/StringMap.h"
24 #include "llvm/ADT/UniqueVector.h"
25 #include "llvm/Support/Allocator.h"
26 #include "llvm/Support/DebugLoc.h"
27
28 namespace llvm {
29
30 class CompileUnit;
31 class DbgConcreteScope;
32 class DbgScope;
33 class DbgVariable;
34 class MachineFrameInfo;
35 class MachineModuleInfo;
36 class MachineOperand;
37 class MCAsmInfo;
38 class DIEAbbrev;
39 class DIE;
40 class DIEBlock;
41 class DIEEntry;
42
43 class DIEnumerator;
44 class DIDescriptor;
45 class DIVariable;
46 class DIGlobal;
47 class DIGlobalVariable;
48 class DISubprogram;
49 class DIBasicType;
50 class DIDerivedType;
51 class DIType;
52 class DINameSpace;
53 class DISubrange;
54 class DICompositeType;
55 class DITemplateTypeParameter;
56 class DITemplateValueParameter;
57
58 //===----------------------------------------------------------------------===//
59 /// SrcLineInfo - This class is used to record source line correspondence.
60 ///
61 class SrcLineInfo {
62   unsigned Line;                     // Source line number.
63   unsigned Column;                   // Source column.
64   unsigned SourceID;                 // Source ID number.
65   MCSymbol *Label;                   // Label in code ID number.
66 public:
67   SrcLineInfo(unsigned L, unsigned C, unsigned S, MCSymbol *label)
68     : Line(L), Column(C), SourceID(S), Label(label) {}
69
70   // Accessors
71   unsigned getLine() const { return Line; }
72   unsigned getColumn() const { return Column; }
73   unsigned getSourceID() const { return SourceID; }
74   MCSymbol *getLabel() const { return Label; }
75 };
76
77 class DwarfDebug {
78   /// Asm - Target of Dwarf emission.
79   AsmPrinter *Asm;
80
81   /// MMI - Collected machine module information.
82   MachineModuleInfo *MMI;
83
84   //===--------------------------------------------------------------------===//
85   // Attributes used to construct specific Dwarf sections.
86   //
87
88   CompileUnit *FirstCU;
89   DenseMap <const MDNode *, CompileUnit *> CUMap;
90
91   /// AbbreviationsSet - Used to uniquely define abbreviations.
92   ///
93   FoldingSet<DIEAbbrev> AbbreviationsSet;
94
95   /// Abbreviations - A list of all the unique abbreviations in use.
96   ///
97   std::vector<DIEAbbrev *> Abbreviations;
98
99   /// SourceIdMap - Source id map, i.e. pair of directory id and source file
100   /// id mapped to a unique id.
101   StringMap<unsigned> SourceIdMap;
102
103   /// DIEBlocks - A list of all the DIEBlocks in use.
104   std::vector<DIEBlock *> DIEBlocks;
105
106   // DIEValueAllocator - All DIEValues are allocated through this allocator.
107   BumpPtrAllocator DIEValueAllocator;
108
109   /// StringPool - A String->Symbol mapping of strings used by indirect
110   /// references.
111   StringMap<std::pair<MCSymbol*, unsigned> > StringPool;
112   unsigned NextStringPoolNumber;
113   
114   MCSymbol *getStringPoolEntry(StringRef Str);
115
116   /// SectionMap - Provides a unique id per text section.
117   ///
118   UniqueVector<const MCSection*> SectionMap;
119
120   // CurrentFnDbgScope - Top level scope for the current function.
121   //
122   DbgScope *CurrentFnDbgScope;
123   
124   /// DbgScopeMap - Tracks the scopes in the current function.  Owns the
125   /// contained DbgScope*s.
126   ///
127   DenseMap<const MDNode *, DbgScope *> DbgScopeMap;
128
129   /// ConcreteScopes - Tracks the concrete scopees in the current function.
130   /// These scopes are also included in DbgScopeMap.
131   DenseMap<const MDNode *, DbgScope *> ConcreteScopes;
132
133   /// AbstractScopes - Tracks the abstract scopes a module. These scopes are
134   /// not included DbgScopeMap.  AbstractScopes owns its DbgScope*s.
135   DenseMap<const MDNode *, DbgScope *> AbstractScopes;
136
137   /// AbstractSPDies - Collection of abstract subprogram DIEs.
138   DenseMap<const MDNode *, DIE *> AbstractSPDies;
139
140   /// AbstractScopesList - Tracks abstract scopes constructed while processing
141   /// a function. This list is cleared during endFunction().
142   SmallVector<DbgScope *, 4>AbstractScopesList;
143
144   /// AbstractVariables - Collection on abstract variables.  Owned by the
145   /// DbgScopes in AbstractScopes.
146   DenseMap<const MDNode *, DbgVariable *> AbstractVariables;
147
148   /// DbgVariableToFrameIndexMap - Tracks frame index used to find 
149   /// variable's value.
150   DenseMap<const DbgVariable *, int> DbgVariableToFrameIndexMap;
151
152   /// DbgVariableToDbgInstMap - Maps DbgVariable to corresponding DBG_VALUE
153   /// machine instruction.
154   DenseMap<const DbgVariable *, const MachineInstr *> DbgVariableToDbgInstMap;
155
156   /// DotDebugLocEntry - This struct describes location entries emitted in
157   /// .debug_loc section.
158   typedef struct DotDebugLocEntry {
159     const MCSymbol *Begin;
160     const MCSymbol *End;
161     MachineLocation Loc;
162     DotDebugLocEntry() : Begin(0), End(0) {}
163     DotDebugLocEntry(const MCSymbol *B, const MCSymbol *E, 
164                   MachineLocation &L) : Begin(B), End(E), Loc(L) {}
165     /// Empty entries are also used as a trigger to emit temp label. Such
166     /// labels are referenced is used to find debug_loc offset for a given DIE.
167     bool isEmpty() { return Begin == 0 && End == 0; }
168   } DotDebugLocEntry;
169
170   /// DotDebugLocEntries - Collection of DotDebugLocEntry.
171   SmallVector<DotDebugLocEntry, 4> DotDebugLocEntries;
172
173   /// UseDotDebugLocEntry - DW_AT_location attributes for the DIEs in this set
174   /// idetifies corresponding .debug_loc entry offset.
175   SmallPtrSet<const DIE *, 4> UseDotDebugLocEntry;
176
177   /// VarToAbstractVarMap - Maps DbgVariable with corresponding Abstract
178   /// DbgVariable, if any.
179   DenseMap<const DbgVariable *, const DbgVariable *> VarToAbstractVarMap;
180
181   /// InliendSubprogramDIEs - Collection of subprgram DIEs that are marked
182   /// (at the end of the module) as DW_AT_inline.
183   SmallPtrSet<DIE *, 4> InlinedSubprogramDIEs;
184
185   /// ContainingTypeMap - This map is used to keep track of subprogram DIEs that
186   /// need DW_AT_containing_type attribute. This attribute points to a DIE that
187   /// corresponds to the MDNode mapped with the subprogram DIE.
188   DenseMap<DIE *, const MDNode *> ContainingTypeMap;
189
190   typedef SmallVector<DbgScope *, 2> ScopeVector;
191
192   SmallPtrSet<const MachineInstr *, 8> InsnsEndScopeSet;
193
194   /// InlineInfo - Keep track of inlined functions and their location.  This
195   /// information is used to populate debug_inlined section.
196   typedef std::pair<const MCSymbol *, DIE *> InlineInfoLabels;
197   DenseMap<const MDNode *, SmallVector<InlineInfoLabels, 4> > InlineInfo;
198   SmallVector<const MDNode *, 4> InlinedSPNodes;
199
200   // ProcessedSPNodes - This is a collection of subprogram MDNodes that
201   // are processed to create DIEs.
202   SmallPtrSet<const MDNode *, 16> ProcessedSPNodes;
203
204   /// LabelsBeforeInsn - Maps instruction with label emitted before 
205   /// instruction.
206   DenseMap<const MachineInstr *, MCSymbol *> LabelsBeforeInsn;
207
208   /// LabelsAfterInsn - Maps instruction with label emitted after
209   /// instruction.
210   DenseMap<const MachineInstr *, MCSymbol *> LabelsAfterInsn;
211
212   /// insnNeedsLabel - Collection of instructions that need a label to mark
213   /// a debuggging information entity.
214   SmallPtrSet<const MachineInstr *, 8> InsnNeedsLabel;
215
216   SmallVector<const MCSymbol *, 8> DebugRangeSymbols;
217
218   /// Previous instruction's location information. This is used to determine
219   /// label location to indicate scope boundries in dwarf debug info.
220   DebugLoc PrevInstLoc;
221   MCSymbol *PrevLabel;
222
223   struct FunctionDebugFrameInfo {
224     unsigned Number;
225     std::vector<MachineMove> Moves;
226
227     FunctionDebugFrameInfo(unsigned Num, const std::vector<MachineMove> &M)
228       : Number(Num), Moves(M) {}
229   };
230
231   std::vector<FunctionDebugFrameInfo> DebugFrames;
232
233   // Section Symbols: these are assembler temporary labels that are emitted at
234   // the beginning of each supported dwarf section.  These are used to form
235   // section offsets and are created by EmitSectionLabels.
236   MCSymbol *DwarfFrameSectionSym, *DwarfInfoSectionSym, *DwarfAbbrevSectionSym;
237   MCSymbol *DwarfStrSectionSym, *TextSectionSym, *DwarfDebugRangeSectionSym;
238   MCSymbol *DwarfDebugLocSectionSym;
239   MCSymbol *FunctionBeginSym, *FunctionEndSym;
240
241   DIEInteger *DIEIntegerOne;
242 private:
243
244   /// getNumSourceIds - Return the number of unique source ids.
245   unsigned getNumSourceIds() const {
246     return SourceIdMap.size();
247   }
248
249   /// assignAbbrevNumber - Define a unique number for the abbreviation.
250   ///
251   void assignAbbrevNumber(DIEAbbrev &Abbrev);
252
253   /// createDIEEntry - Creates a new DIEEntry to be a proxy for a debug
254   /// information entry.
255   DIEEntry *createDIEEntry(DIE *Entry);
256
257   /// addUInt - Add an unsigned integer attribute data and value.
258   ///
259   void addUInt(DIE *Die, unsigned Attribute, unsigned Form, uint64_t Integer);
260
261   /// addSInt - Add an signed integer attribute data and value.
262   ///
263   void addSInt(DIE *Die, unsigned Attribute, unsigned Form, int64_t Integer);
264
265   /// addString - Add a string attribute data and value.
266   ///
267   void addString(DIE *Die, unsigned Attribute, unsigned Form,
268                  const StringRef Str);
269
270   /// addLabel - Add a Dwarf label attribute data and value.
271   ///
272   void addLabel(DIE *Die, unsigned Attribute, unsigned Form,
273                 const MCSymbol *Label);
274
275   /// addDelta - Add a label delta attribute data and value.
276   ///
277   void addDelta(DIE *Die, unsigned Attribute, unsigned Form,
278                 const MCSymbol *Hi, const MCSymbol *Lo);
279
280   /// addDIEEntry - Add a DIE attribute data and value.
281   ///
282   void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry);
283   
284   /// addBlock - Add block data.
285   ///
286   void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block);
287
288   /// addSourceLine - Add location information to specified debug information
289   /// entry.
290   void addSourceLine(DIE *Die, DIVariable V);
291   void addSourceLine(DIE *Die, DIGlobalVariable G);
292   void addSourceLine(DIE *Die, DISubprogram SP);
293   void addSourceLine(DIE *Die, DIType Ty);
294   void addSourceLine(DIE *Die, DINameSpace NS);
295
296   /// addAddress - Add an address attribute to a die based on the location
297   /// provided.
298   void addAddress(DIE *Die, unsigned Attribute,
299                   const MachineLocation &Location);
300
301   /// addRegisterAddress - Add register location entry in variable DIE.
302   bool addRegisterAddress(DIE *Die, const MachineOperand &MO);
303
304   /// addConstantValue - Add constant value entry in variable DIE.
305   bool addConstantValue(DIE *Die, const MachineOperand &MO);
306   bool addConstantValue(DIE *Die, ConstantInt *CI, bool Unsigned);
307
308   /// addConstantFPValue - Add constant value entry in variable DIE.
309   bool addConstantFPValue(DIE *Die, const MachineOperand &MO);
310
311   /// addComplexAddress - Start with the address based on the location provided,
312   /// and generate the DWARF information necessary to find the actual variable
313   /// (navigating the extra location information encoded in the type) based on
314   /// the starting location.  Add the DWARF information to the die.
315   ///
316   void addComplexAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
317                          const MachineLocation &Location);
318
319   // FIXME: Should be reformulated in terms of addComplexAddress.
320   /// addBlockByrefAddress - Start with the address based on the location
321   /// provided, and generate the DWARF information necessary to find the
322   /// actual Block variable (navigating the Block struct) based on the
323   /// starting location.  Add the DWARF information to the die.  Obsolete,
324   /// please use addComplexAddress instead.
325   ///
326   void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
327                             const MachineLocation &Location);
328
329   /// addVariableAddress - Add DW_AT_location attribute for a DbgVariable based
330   /// on provided frame index.
331   void addVariableAddress(DbgVariable *&DV, DIE *Die, int64_t FI);
332
333   /// addToContextOwner - Add Die into the list of its context owner's children.
334   void addToContextOwner(DIE *Die, DIDescriptor Context);
335
336   /// addType - Add a new type attribute to the specified entity.
337   void addType(DIE *Entity, DIType Ty);
338
339  
340   /// getOrCreateNameSpace - Create a DIE for DINameSpace.
341   DIE *getOrCreateNameSpace(DINameSpace NS);
342
343   /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
344   /// given DIType.
345   DIE *getOrCreateTypeDIE(DIType Ty);
346
347   /// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE 
348   /// for the given DITemplateTypeParameter.
349   DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP);
350
351   /// getOrCreateTemplateValueParameterDIE - Find existing DIE or create new DIE 
352   /// for the given DITemplateValueParameter.
353   DIE *getOrCreateTemplateValueParameterDIE(DITemplateValueParameter TVP);
354
355   void addPubTypes(DISubprogram SP);
356
357   /// constructTypeDIE - Construct basic type die from DIBasicType.
358   void constructTypeDIE(DIE &Buffer,
359                         DIBasicType BTy);
360
361   /// constructTypeDIE - Construct derived type die from DIDerivedType.
362   void constructTypeDIE(DIE &Buffer,
363                         DIDerivedType DTy);
364
365   /// constructTypeDIE - Construct type DIE from DICompositeType.
366   void constructTypeDIE(DIE &Buffer,
367                         DICompositeType CTy);
368
369   /// constructSubrangeDIE - Construct subrange DIE from DISubrange.
370   void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy);
371
372   /// constructArrayTypeDIE - Construct array type DIE from DICompositeType.
373   void constructArrayTypeDIE(DIE &Buffer, 
374                              DICompositeType *CTy);
375
376   /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
377   DIE *constructEnumTypeDIE(DIEnumerator ETy);
378
379   /// createMemberDIE - Create new member DIE.
380   DIE *createMemberDIE(DIDerivedType DT);
381
382   /// createSubprogramDIE - Create new DIE using SP.
383   DIE *createSubprogramDIE(DISubprogram SP);
384
385   /// getOrCreateDbgScope - Create DbgScope for the scope.
386   DbgScope *getOrCreateDbgScope(const MDNode *Scope, const MDNode *InlinedAt);
387
388   DbgScope *getOrCreateAbstractScope(const MDNode *N);
389
390   /// findAbstractVariable - Find abstract variable associated with Var.
391   DbgVariable *findAbstractVariable(DIVariable &Var, DebugLoc Loc);
392
393   /// updateSubprogramScopeDIE - Find DIE for the given subprogram and 
394   /// attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes.
395   /// If there are global variables in this scope then create and insert
396   /// DIEs for these variables.
397   DIE *updateSubprogramScopeDIE(const MDNode *SPNode);
398
399   /// constructLexicalScope - Construct new DW_TAG_lexical_block 
400   /// for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels.
401   DIE *constructLexicalScopeDIE(DbgScope *Scope);
402
403   /// constructInlinedScopeDIE - This scope represents inlined body of
404   /// a function. Construct DIE to represent this concrete inlined copy
405   /// of the function.
406   DIE *constructInlinedScopeDIE(DbgScope *Scope);
407
408   /// constructVariableDIE - Construct a DIE for the given DbgVariable.
409   DIE *constructVariableDIE(DbgVariable *DV, DbgScope *S);
410
411   /// constructScopeDIE - Construct a DIE for this scope.
412   DIE *constructScopeDIE(DbgScope *Scope);
413
414   /// EmitSectionLabels - Emit initial Dwarf sections with a label at
415   /// the start of each one.
416   void EmitSectionLabels();
417
418   /// emitDIE - Recusively Emits a debug information entry.
419   ///
420   void emitDIE(DIE *Die);
421
422   /// computeSizeAndOffset - Compute the size and offset of a DIE.
423   ///
424   unsigned computeSizeAndOffset(DIE *Die, unsigned Offset, bool Last);
425
426   /// computeSizeAndOffsets - Compute the size and offset of all the DIEs.
427   ///
428   void computeSizeAndOffsets();
429
430   /// EmitDebugInfo - Emit the debug info section.
431   ///
432   void emitDebugInfo();
433
434   /// emitAbbreviations - Emit the abbreviation section.
435   ///
436   void emitAbbreviations() const;
437
438   /// emitEndOfLineMatrix - Emit the last address of the section and the end of
439   /// the line matrix.
440   ///
441   void emitEndOfLineMatrix(unsigned SectionEnd);
442
443   /// emitCommonDebugFrame - Emit common frame info into a debug frame section.
444   ///
445   void emitCommonDebugFrame();
446
447   /// emitFunctionDebugFrame - Emit per function frame info into a debug frame
448   /// section.
449   void emitFunctionDebugFrame(const FunctionDebugFrameInfo &DebugFrameInfo);
450
451   /// emitDebugPubNames - Emit visible names into a debug pubnames section.
452   ///
453   void emitDebugPubNames();
454
455   /// emitDebugPubTypes - Emit visible types into a debug pubtypes section.
456   ///
457   void emitDebugPubTypes();
458
459   /// emitDebugStr - Emit visible names into a debug str section.
460   ///
461   void emitDebugStr();
462
463   /// emitDebugLoc - Emit visible names into a debug loc section.
464   ///
465   void emitDebugLoc();
466
467   /// EmitDebugARanges - Emit visible names into a debug aranges section.
468   ///
469   void EmitDebugARanges();
470
471   /// emitDebugRanges - Emit visible names into a debug ranges section.
472   ///
473   void emitDebugRanges();
474
475   /// emitDebugMacInfo - Emit visible names into a debug macinfo section.
476   ///
477   void emitDebugMacInfo();
478
479   /// emitDebugInlineInfo - Emit inline info using following format.
480   /// Section Header:
481   /// 1. length of section
482   /// 2. Dwarf version number
483   /// 3. address size.
484   ///
485   /// Entries (one "entry" for each function that was inlined):
486   ///
487   /// 1. offset into __debug_str section for MIPS linkage name, if exists; 
488   ///   otherwise offset into __debug_str for regular function name.
489   /// 2. offset into __debug_str section for regular function name.
490   /// 3. an unsigned LEB128 number indicating the number of distinct inlining 
491   /// instances for the function.
492   /// 
493   /// The rest of the entry consists of a {die_offset, low_pc}  pair for each 
494   /// inlined instance; the die_offset points to the inlined_subroutine die in
495   /// the __debug_info section, and the low_pc is the starting address  for the
496   ///  inlining instance.
497   void emitDebugInlineInfo();
498
499   /// GetOrCreateSourceID - Look up the source id with the given directory and
500   /// source file names. If none currently exists, create a new id and insert it
501   /// in the SourceIds map.
502   unsigned GetOrCreateSourceID(StringRef FullName);
503
504   /// constructCompileUnit - Create new CompileUnit for the given 
505   /// metadata node with tag DW_TAG_compile_unit.
506   void constructCompileUnit(const MDNode *N);
507
508   /// getCompielUnit - Get CompileUnit DIE.
509   CompileUnit *getCompileUnit(const MDNode *N) const;
510
511   /// constructGlobalVariableDIE - Construct global variable DIE.
512   void constructGlobalVariableDIE(const MDNode *N);
513
514   /// construct SubprogramDIE - Construct subprogram DIE.
515   void constructSubprogramDIE(const MDNode *N);
516
517   /// recordSourceLine - Register a source line with debug info. Returns the
518   /// unique label that was emitted and which provides correspondence to
519   /// the source line list.
520   MCSymbol *recordSourceLine(unsigned Line, unsigned Col, const MDNode *Scope);
521   
522   /// recordVariableFrameIndex - Record a variable's index.
523   void recordVariableFrameIndex(const DbgVariable *V, int Index);
524
525   /// findVariableFrameIndex - Return true if frame index for the variable
526   /// is found. Update FI to hold value of the index.
527   bool findVariableFrameIndex(const DbgVariable *V, int *FI);
528
529   /// findDbgScope - Find DbgScope for the debug loc attached with an 
530   /// instruction.
531   DbgScope *findDbgScope(const MachineInstr *MI);
532
533   /// identifyScopeMarkers() - Indentify instructions that are marking
534   /// beginning of or end of a scope.
535   void identifyScopeMarkers();
536
537   /// extractScopeInformation - Scan machine instructions in this function
538   /// and collect DbgScopes. Return true, if atleast one scope was found.
539   bool extractScopeInformation();
540   
541   /// collectVariableInfo - Populate DbgScope entries with variables' info.
542   void collectVariableInfo(const MachineFunction *,
543                            SmallPtrSet<const MDNode *, 16> &ProcessedVars);
544   
545   /// collectVariableInfoFromMMITable - Collect variable information from
546   /// side table maintained by MMI.
547   void collectVariableInfoFromMMITable(const MachineFunction * MF,
548                                        SmallPtrSet<const MDNode *, 16> &P);
549 public:
550   //===--------------------------------------------------------------------===//
551   // Main entry points.
552   //
553   DwarfDebug(AsmPrinter *A, Module *M);
554   ~DwarfDebug();
555
556   /// beginModule - Emit all Dwarf sections that should come prior to the
557   /// content.
558   void beginModule(Module *M);
559
560   /// endModule - Emit all Dwarf sections that should come after the content.
561   ///
562   void endModule();
563
564   /// beginFunction - Gather pre-function debug information.  Assumes being
565   /// emitted immediately after the function entry point.
566   void beginFunction(const MachineFunction *MF);
567
568   /// endFunction - Gather and emit post-function debug information.
569   ///
570   void endFunction(const MachineFunction *MF);
571
572   /// getLabelBeforeInsn - Return Label preceding the instruction.
573   const MCSymbol *getLabelBeforeInsn(const MachineInstr *MI);
574
575   /// getLabelAfterInsn - Return Label immediately following the instruction.
576   const MCSymbol *getLabelAfterInsn(const MachineInstr *MI);
577
578   /// beginInstruction - Process beginning of an instruction.
579   void beginInstruction(const MachineInstr *MI);
580
581   /// endInstruction - Prcess end of an instruction.
582   void endInstruction(const MachineInstr *MI);
583 };
584 } // End of namespace llvm
585
586 #endif