LLVM  16.0.0git
AsmPrinter.h
Go to the documentation of this file.
1 //===- llvm/CodeGen/AsmPrinter.h - AsmPrinter Framework ---------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains a class to be used as the base class for target specific
10 // asm writers. This class primarily handles common functionality used by
11 // all asm writers.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CODEGEN_ASMPRINTER_H
16 #define LLVM_CODEGEN_ASMPRINTER_H
17 
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/DenseSet.h"
20 #include "llvm/ADT/MapVector.h"
21 #include "llvm/ADT/SmallVector.h"
26 #include "llvm/CodeGen/StackMaps.h"
27 #include "llvm/IR/InlineAsm.h"
29 #include <cstdint>
30 #include <memory>
31 #include <utility>
32 #include <vector>
33 
34 namespace llvm {
35 
36 class AddrLabelMap;
37 class BasicBlock;
38 class BlockAddress;
39 class Constant;
40 class ConstantArray;
41 class DataLayout;
42 class DIE;
43 class DIEAbbrev;
44 class DwarfDebug;
45 class GCMetadataPrinter;
46 class GCStrategy;
47 class GlobalAlias;
48 class GlobalObject;
49 class GlobalValue;
50 class GlobalVariable;
51 class MachineBasicBlock;
52 class MachineConstantPoolValue;
53 class MachineDominatorTree;
54 class MachineFunction;
55 class MachineInstr;
56 class MachineJumpTableInfo;
57 class MachineLoopInfo;
58 class MachineModuleInfo;
59 class MachineOptimizationRemarkEmitter;
60 class MCAsmInfo;
61 class MCCFIInstruction;
62 class MCContext;
63 class MCExpr;
64 class MCInst;
65 class MCSection;
66 class MCStreamer;
67 class MCSubtargetInfo;
68 class MCSymbol;
69 class MCTargetOptions;
70 class MDNode;
71 class Module;
72 class PseudoProbeHandler;
73 class raw_ostream;
74 class StringRef;
75 class TargetLoweringObjectFile;
76 class TargetMachine;
77 class Twine;
78 
79 namespace remarks {
80 class RemarkStreamer;
81 }
82 
83 /// This class is intended to be used as a driving class for all asm writers.
85 public:
86  /// Target machine description.
88 
89  /// Target Asm Printer information.
90  const MCAsmInfo *MAI;
91 
92  /// This is the context for the output file that we are streaming. This owns
93  /// all of the global MC-related objects for the generated translation unit.
95 
96  /// This is the MCStreamer object for the file we are generating. This
97  /// contains the transient state for the current translation unit that we are
98  /// generating (such as the current section etc).
99  std::unique_ptr<MCStreamer> OutStreamer;
100 
101  /// The current machine function.
102  MachineFunction *MF = nullptr;
103 
104  /// This is a pointer to the current MachineModuleInfo.
105  MachineModuleInfo *MMI = nullptr;
106 
107  /// This is a pointer to the current MachineDominatorTree.
109 
110  /// This is a pointer to the current MachineLoopInfo.
111  MachineLoopInfo *MLI = nullptr;
112 
113  /// Optimization remark emitter.
115 
116  /// The symbol for the entry in __patchable_function_entires.
118 
119  /// The symbol for the current function. This is recalculated at the beginning
120  /// of each call to runOnMachineFunction().
121  MCSymbol *CurrentFnSym = nullptr;
122 
123  /// The symbol for the current function descriptor on AIX. This is created
124  /// at the beginning of each call to SetupMachineFunction().
126 
127  /// The symbol used to represent the start of the current function for the
128  /// purpose of calculating its size (e.g. using the .size directive). By
129  /// default, this is equal to CurrentFnSym.
131 
132  /// Map a basic block section ID to the begin and end symbols of that section
133  /// which determine the section's range.
136  };
137 
139 
140  /// Map global GOT equivalent MCSymbols to GlobalVariables and keep track of
141  /// its number of uses by other globals.
142  using GOTEquivUsePair = std::pair<const GlobalVariable *, unsigned>;
144 
145  /// struct HandlerInfo and Handlers permit users or target extended
146  /// AsmPrinter to add their own handlers.
147  struct HandlerInfo {
148  std::unique_ptr<AsmPrinterHandler> Handler;
153 
154  HandlerInfo(std::unique_ptr<AsmPrinterHandler> Handler, StringRef TimerName,
160  };
161 
162  // Flags representing which CFI section is required for a function/module.
163  enum class CFISection : unsigned {
164  None = 0, ///< Do not emit either .eh_frame or .debug_frame
165  EH = 1, ///< Emit .eh_frame
166  Debug = 2 ///< Emit .debug_frame
167  };
168 
169 private:
170  MCSymbol *CurrentFnEnd = nullptr;
171 
172  /// Map a basic block section ID to the exception symbol associated with that
173  /// section. Map entries are assigned and looked up via
174  /// AsmPrinter::getMBBExceptionSym.
175  DenseMap<unsigned, MCSymbol *> MBBSectionExceptionSyms;
176 
177  // The symbol used to represent the start of the current BB section of the
178  // function. This is used to calculate the size of the BB section.
179  MCSymbol *CurrentSectionBeginSym = nullptr;
180 
181  /// This map keeps track of which symbol is being used for the specified basic
182  /// block's address of label.
183  std::unique_ptr<AddrLabelMap> AddrLabelSymbols;
184 
185  // The garbage collection metadata printer table.
186  void *GCMetadataPrinters = nullptr; // Really a DenseMap.
187 
188  /// Emit comments in assembly output if this is true.
189  bool VerboseAsm;
190 
191  /// Output stream for the stack usage file (i.e., .su file).
192  std::unique_ptr<raw_fd_ostream> StackUsageStream;
193 
194  /// List of symbols to be inserted into PC sections.
196 
197  static char ID;
198 
199 protected:
201 
202  /// For dso_local functions, the current $local alias for the function.
204 
205  /// A vector of all debug/EH info emitters we should use. This vector
206  /// maintains ownership of the emitters.
207  std::vector<HandlerInfo> Handlers;
208  size_t NumUserHandlers = 0;
209 
211 
212 private:
213  /// If generated on the fly this own the instance.
214  std::unique_ptr<MachineDominatorTree> OwnedMDT;
215 
216  /// If generated on the fly this own the instance.
217  std::unique_ptr<MachineLoopInfo> OwnedMLI;
218 
219  /// If the target supports dwarf debug info, this pointer is non-null.
220  DwarfDebug *DD = nullptr;
221 
222  /// A handler that supports pseudo probe emission with embedded inline
223  /// context.
224  PseudoProbeHandler *PP = nullptr;
225 
226  /// CFISection type the module needs i.e. either .eh_frame or .debug_frame.
227  CFISection ModuleCFISection = CFISection::None;
228 
229  /// True if the module contains split-stack functions. This is used to
230  /// emit .note.GNU-split-stack section as required by the linker for
231  /// special handling split-stack function calling no-split-stack function.
232  bool HasSplitStack = false;
233 
234  /// True if the module contains no-split-stack functions. This is used to emit
235  /// .note.GNU-no-split-stack section when it also contains functions without a
236  /// split stack prologue.
237  bool HasNoSplitStack = false;
238 
239 protected:
240  explicit AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer);
241 
242 public:
243  ~AsmPrinter() override;
244 
245  DwarfDebug *getDwarfDebug() { return DD; }
246  DwarfDebug *getDwarfDebug() const { return DD; }
247 
248  uint16_t getDwarfVersion() const;
250 
251  bool isDwarf64() const;
252 
253  /// Returns 4 for DWARF32 and 8 for DWARF64.
254  unsigned int getDwarfOffsetByteSize() const;
255 
256  /// Returns 4 for DWARF32 and 12 for DWARF64.
257  unsigned int getUnitLengthFieldByteSize() const;
258 
259  /// Returns information about the byte size of DW_FORM values.
261 
262  bool isPositionIndependent() const;
263 
264  /// Return true if assembly output should contain comments.
265  bool isVerbose() const { return VerboseAsm; }
266 
267  /// Return a unique ID for the current function.
268  unsigned getFunctionNumber() const;
269 
270  /// Return symbol for the function pseudo stack if the stack frame is not a
271  /// register based.
272  virtual const MCSymbol *getFunctionFrameSymbol() const { return nullptr; }
273 
275  MCSymbol *getFunctionEnd() const { return CurrentFnEnd; }
276 
277  // Return the exception symbol associated with the MBB section containing a
278  // given basic block.
280 
281  /// Return the symbol to be used for the specified basic block when its
282  /// address is taken. This cannot be its normal LBB label because the block
283  /// may be accessed outside its containing function.
285  return getAddrLabelSymbolToEmit(BB).front();
286  }
287 
288  /// Return the symbol to be used for the specified basic block when its
289  /// address is taken. If other blocks were RAUW'd to this one, we may have
290  /// to emit them as well, return the whole set.
292 
293  /// If the specified function has had any references to address-taken blocks
294  /// generated, but the block got deleted, return the symbol now so we can
295  /// emit it. This prevents emitting a reference to a symbol that has no
296  /// definition.
298  std::vector<MCSymbol *> &Result);
299 
300  /// Return information about object file lowering.
302 
303  /// Return information about data layout.
304  const DataLayout &getDataLayout() const;
305 
306  /// Return the pointer size from the TargetMachine
307  unsigned getPointerSize() const;
308 
309  /// Return information about subtarget.
310  const MCSubtargetInfo &getSubtargetInfo() const;
311 
312  void EmitToStreamer(MCStreamer &S, const MCInst &Inst);
313 
314  /// Emits inital debug location directive.
316 
317  /// Return the current section we are emitting to.
318  const MCSection *getCurrentSection() const;
319 
321  const GlobalValue *GV) const;
322 
323  MCSymbol *getSymbol(const GlobalValue *GV) const;
324 
325  /// Similar to getSymbol() but preferred for references. On ELF, this uses a
326  /// local symbol if a reference to GV is guaranteed to be resolved to the
327  /// definition in the same module.
328  MCSymbol *getSymbolPreferLocal(const GlobalValue &GV) const;
329 
330  //===------------------------------------------------------------------===//
331  // XRay instrumentation implementation.
332  //===------------------------------------------------------------------===//
333 public:
334  // This describes the kind of sled we're storing in the XRay table.
335  enum class SledKind : uint8_t {
336  FUNCTION_ENTER = 0,
337  FUNCTION_EXIT = 1,
338  TAIL_CALL = 2,
339  LOG_ARGS_ENTER = 3,
340  CUSTOM_EVENT = 4,
341  TYPED_EVENT = 5,
342  };
343 
344  // The table will contain these structs that point to the sled, the function
345  // containing the sled, and what kind of sled (and whether they should always
346  // be instrumented). We also use a version identifier that the runtime can use
347  // to decide what to do with the sled, depending on the version of the sled.
349  const MCSymbol *Sled;
353  const class Function *Fn;
354  uint8_t Version;
355 
356  void emit(int, MCStreamer *) const;
357  };
358 
359  // All the sleds to be emitted.
361 
362  // Helper function to record a given XRay sled.
363  void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind,
364  uint8_t Version = 0);
365 
366  /// Emit a table with all XRay instrumentation points.
367  void emitXRayTable();
368 
370 
371  //===------------------------------------------------------------------===//
372  // MachineFunctionPass Implementation.
373  //===------------------------------------------------------------------===//
374 
375  /// Record analysis usage.
376  void getAnalysisUsage(AnalysisUsage &AU) const override;
377 
378  /// Set up the AsmPrinter when we are working on a new module. If your pass
379  /// overrides this, it must make sure to explicitly call this implementation.
380  bool doInitialization(Module &M) override;
381 
382  /// Shut down the asmprinter. If you override this in your pass, you must make
383  /// sure to call it explicitly.
384  bool doFinalization(Module &M) override;
385 
386  /// Emit the specified function out to the OutStreamer.
390  return false;
391  }
392 
393  //===------------------------------------------------------------------===//
394  // Coarse grained IR lowering routines.
395  //===------------------------------------------------------------------===//
396 
397  /// This should be called when a new MachineFunction is being processed from
398  /// runOnMachineFunction.
399  virtual void SetupMachineFunction(MachineFunction &MF);
400 
401  /// This method emits the body and trailer for a function.
402  void emitFunctionBody();
403 
404  void emitCFIInstruction(const MachineInstr &MI);
405 
406  void emitFrameAlloc(const MachineInstr &MI);
407 
409 
410  void emitStackUsage(const MachineFunction &MF);
411 
413 
414  void emitKCFITrapEntry(const MachineFunction &MF, const MCSymbol *Symbol);
415  virtual void emitKCFITypeId(const MachineFunction &MF);
416 
417  void emitPseudoProbe(const MachineInstr &MI);
418 
420 
421  /// Emits a label as reference for PC sections.
422  void emitPCSectionsLabel(const MachineFunction &MF, const MDNode &MD);
423 
424  /// Emits the PC sections collected from instructions.
425  void emitPCSections(const MachineFunction &MF);
426 
427  /// Get the CFISection type for a function.
429 
430  /// Get the CFISection type for a function.
432 
433  /// Get the CFISection type for the module.
434  CFISection getModuleCFISectionType() const { return ModuleCFISection; }
435 
436  bool needsSEHMoves();
437 
438  /// Since emitting CFI unwind information is entangled with supporting the
439  /// exceptions, this returns true for platforms which use CFI unwind
440  /// information for debugging purpose when
441  /// `MCAsmInfo::ExceptionsType == ExceptionHandling::None`.
442  bool needsCFIForDebug() const;
443 
444  /// Print to the current output stream assembly representations of the
445  /// constants in the constant pool MCP. This is used to print out constants
446  /// which have been "spilled to memory" by the code generator.
447  virtual void emitConstantPool();
448 
449  /// Print assembly representations of the jump tables used by the current
450  /// function to the current output stream.
451  virtual void emitJumpTableInfo();
452 
453  /// Emit the specified global variable to the .s file.
454  virtual void emitGlobalVariable(const GlobalVariable *GV);
455 
456  /// Check to see if the specified global is a special global used by LLVM. If
457  /// so, emit it and return true, otherwise do nothing and return false.
458  bool emitSpecialLLVMGlobal(const GlobalVariable *GV);
459 
460  /// `llvm.global_ctors` and `llvm.global_dtors` are arrays of Structor
461  /// structs.
462  ///
463  /// Priority - init priority
464  /// Func - global initialization or global clean-up function
465  /// ComdatKey - associated data
466  struct Structor {
467  int Priority = 0;
468  Constant *Func = nullptr;
469  GlobalValue *ComdatKey = nullptr;
470 
471  Structor() = default;
472  };
473 
474  /// This method gathers an array of Structors and then sorts them out by
475  /// Priority.
476  /// @param List The initializer of `llvm.global_ctors` or `llvm.global_dtors`
477  /// array.
478  /// @param[out] Structors Sorted Structor structs by Priority.
479  void preprocessXXStructorList(const DataLayout &DL, const Constant *List,
480  SmallVector<Structor, 8> &Structors);
481 
482  /// This method emits `llvm.global_ctors` or `llvm.global_dtors` list.
483  virtual void emitXXStructorList(const DataLayout &DL, const Constant *List,
484  bool IsCtor);
485 
486  /// Emit an alignment directive to the specified power of two boundary. If a
487  /// global value is specified, and if that global has an explicit alignment
488  /// requested, it will override the alignment request if required for
489  /// correctness.
490  void emitAlignment(Align Alignment, const GlobalObject *GV = nullptr,
491  unsigned MaxBytesToEmit = 0) const;
492 
493  /// Lower the specified LLVM Constant to an MCExpr.
494  virtual const MCExpr *lowerConstant(const Constant *CV);
495 
496  /// Print a general LLVM constant to the .s file.
497  /// On AIX, when an alias refers to a sub-element of a global variable, the
498  /// label of that alias needs to be emitted before the corresponding element.
500  void emitGlobalConstant(const DataLayout &DL, const Constant *CV,
501  AliasMapTy *AliasList = nullptr);
502 
503  /// Unnamed constant global variables solely contaning a pointer to
504  /// another globals variable act like a global variable "proxy", or GOT
505  /// equivalents, i.e., it's only used to hold the address of the latter. One
506  /// optimization is to replace accesses to these proxies by using the GOT
507  /// entry for the final global instead. Hence, we select GOT equivalent
508  /// candidates among all the module global variables, avoid emitting them
509  /// unnecessarily and finally replace references to them by pc relative
510  /// accesses to GOT entries.
512 
513  /// Constant expressions using GOT equivalent globals may not be
514  /// eligible for PC relative GOT entry conversion, in such cases we need to
515  /// emit the proxies we previously omitted in EmitGlobalVariable.
516  void emitGlobalGOTEquivs();
517 
518  /// Emit the stack maps.
519  void emitStackMaps();
520 
521  //===------------------------------------------------------------------===//
522  // Overridable Hooks
523  //===------------------------------------------------------------------===//
524 
526  Handlers.insert(Handlers.begin(), std::move(Handler));
527  NumUserHandlers++;
528  }
529 
530  // Targets can, or in the case of EmitInstruction, must implement these to
531  // customize output.
532 
533  /// This virtual method can be overridden by targets that want to emit
534  /// something at the start of their file.
535  virtual void emitStartOfAsmFile(Module &) {}
536 
537  /// This virtual method can be overridden by targets that want to emit
538  /// something at the end of their file.
539  virtual void emitEndOfAsmFile(Module &) {}
540 
541  /// Targets can override this to emit stuff before the first basic block in
542  /// the function.
543  virtual void emitFunctionBodyStart() {}
544 
545  /// Targets can override this to emit stuff after the last basic block in the
546  /// function.
547  virtual void emitFunctionBodyEnd() {}
548 
549  /// Targets can override this to emit stuff at the start of a basic block.
550  /// By default, this method prints the label for the specified
551  /// MachineBasicBlock, an alignment (if present) and a comment describing it
552  /// if appropriate.
553  virtual void emitBasicBlockStart(const MachineBasicBlock &MBB);
554 
555  /// Targets can override this to emit stuff at the end of a basic block.
556  virtual void emitBasicBlockEnd(const MachineBasicBlock &MBB);
557 
558  /// Targets should implement this to emit instructions.
559  virtual void emitInstruction(const MachineInstr *) {
560  llvm_unreachable("EmitInstruction not implemented");
561  }
562 
563  /// Return the symbol for the specified constant pool entry.
564  virtual MCSymbol *GetCPISymbol(unsigned CPID) const;
565 
566  virtual void emitFunctionEntryLabel();
567 
568  virtual void emitFunctionDescriptor() {
569  llvm_unreachable("Function descriptor is target-specific.");
570  }
571 
573 
574  /// Targets can override this to change how global constants that are part of
575  /// a C++ static/global constructor list are emitted.
576  virtual void emitXXStructor(const DataLayout &DL, const Constant *CV) {
577  emitGlobalConstant(DL, CV);
578  }
579 
580  /// Return true if the basic block has exactly one predecessor and the control
581  /// transfer mechanism between the predecessor and this block is a
582  /// fall-through.
583  virtual bool
585 
586  /// Targets can override this to customize the output of IMPLICIT_DEF
587  /// instructions in verbose mode.
588  virtual void emitImplicitDef(const MachineInstr *MI) const;
589 
590  /// Emit N NOP instructions.
591  void emitNops(unsigned N);
592 
593  //===------------------------------------------------------------------===//
594  // Symbol Lowering Routines.
595  //===------------------------------------------------------------------===//
596 
597  MCSymbol *createTempSymbol(const Twine &Name) const;
598 
599  /// Return the MCSymbol for a private symbol with global value name as its
600  /// base, with the specified suffix.
602  StringRef Suffix) const;
603 
604  /// Return the MCSymbol for the specified ExternalSymbol.
606 
607  /// Return the symbol for the specified jump table entry.
608  MCSymbol *GetJTISymbol(unsigned JTID, bool isLinkerPrivate = false) const;
609 
610  /// Return the symbol for the specified jump table .set
611  /// FIXME: privatize to AsmPrinter.
612  MCSymbol *GetJTSetSymbol(unsigned UID, unsigned MBBID) const;
613 
614  /// Return the MCSymbol used to satisfy BlockAddress uses of the specified
615  /// basic block.
616  MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const;
618 
619  //===------------------------------------------------------------------===//
620  // Emission Helper Routines.
621  //===------------------------------------------------------------------===//
622 
623  /// This is just convenient handler for printing offsets.
624  void printOffset(int64_t Offset, raw_ostream &OS) const;
625 
626  /// Emit a byte directive and value.
627  void emitInt8(int Value) const;
628 
629  /// Emit a short directive and value.
630  void emitInt16(int Value) const;
631 
632  /// Emit a long directive and value.
633  void emitInt32(int Value) const;
634 
635  /// Emit a long long directive and value.
636  void emitInt64(uint64_t Value) const;
637 
638  /// Emit something like ".long Hi-Lo" where the size in bytes of the directive
639  /// is specified by Size and Hi/Lo specify the labels. This implicitly uses
640  /// .set if it is available.
641  void emitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo,
642  unsigned Size) const;
643 
644  /// Emit something like ".uleb128 Hi-Lo".
645  void emitLabelDifferenceAsULEB128(const MCSymbol *Hi,
646  const MCSymbol *Lo) const;
647 
648  /// Emit something like ".long Label+Offset" where the size in bytes of the
649  /// directive is specified by Size and Label specifies the label. This
650  /// implicitly uses .set if it is available.
651  void emitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
652  unsigned Size, bool IsSectionRelative = false) const;
653 
654  /// Emit something like ".long Label" where the size in bytes of the directive
655  /// is specified by Size and Label specifies the label.
656  void emitLabelReference(const MCSymbol *Label, unsigned Size,
657  bool IsSectionRelative = false) const {
658  emitLabelPlusOffset(Label, 0, Size, IsSectionRelative);
659  }
660 
661  //===------------------------------------------------------------------===//
662  // Dwarf Emission Helper Routines
663  //===------------------------------------------------------------------===//
664 
665  /// Emit the specified signed leb128 value.
666  void emitSLEB128(int64_t Value, const char *Desc = nullptr) const;
667 
668  /// Emit the specified unsigned leb128 value.
669  void emitULEB128(uint64_t Value, const char *Desc = nullptr,
670  unsigned PadTo = 0) const;
671 
672  /// Emit a .byte 42 directive that corresponds to an encoding. If verbose
673  /// assembly output is enabled, we output comments describing the encoding.
674  /// Desc is a string saying what the encoding is specifying (e.g. "LSDA").
675  void emitEncodingByte(unsigned Val, const char *Desc = nullptr) const;
676 
677  /// Return the size of the encoding in bytes.
678  unsigned GetSizeOfEncodedValue(unsigned Encoding) const;
679 
680  /// Emit reference to a ttype global with a specified encoding.
681  virtual void emitTTypeReference(const GlobalValue *GV, unsigned Encoding);
682 
683  /// Emit a reference to a symbol for use in dwarf. Different object formats
684  /// represent this in different ways. Some use a relocation others encode
685  /// the label offset in its section.
686  void emitDwarfSymbolReference(const MCSymbol *Label,
687  bool ForceOffset = false) const;
688 
689  /// Emit the 4- or 8-byte offset of a string from the start of its section.
690  ///
691  /// When possible, emit a DwarfStringPool section offset without any
692  /// relocations, and without using the symbol. Otherwise, defers to \a
693  /// emitDwarfSymbolReference().
694  ///
695  /// The length of the emitted value depends on the DWARF format.
697 
698  /// Emit the 4-or 8-byte offset of a string from the start of its section.
700  emitDwarfStringOffset(S.getEntry());
701  }
702 
703  /// Emit something like ".long Label + Offset" or ".quad Label + Offset"
704  /// depending on the DWARF format.
705  void emitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const;
706 
707  /// Emit 32- or 64-bit value depending on the DWARF format.
709 
710  /// Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen
711  /// according to the settings.
712  void emitDwarfUnitLength(uint64_t Length, const Twine &Comment) const;
713 
714  /// Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen
715  /// according to the settings.
716  /// Return the end symbol generated inside, the caller needs to emit it.
718  const Twine &Comment) const;
719 
720  /// Emit reference to a call site with a specified encoding
721  void emitCallSiteOffset(const MCSymbol *Hi, const MCSymbol *Lo,
722  unsigned Encoding) const;
723  /// Emit an integer value corresponding to the call site encoding
724  void emitCallSiteValue(uint64_t Value, unsigned Encoding) const;
725 
726  /// Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
727  virtual unsigned getISAEncoding() { return 0; }
728 
729  /// Emit the directive and value for debug thread local expression
730  ///
731  /// \p Value - The value to emit.
732  /// \p Size - The size of the integer (in bytes) to emit.
733  virtual void emitDebugValue(const MCExpr *Value, unsigned Size) const;
734 
735  //===------------------------------------------------------------------===//
736  // Dwarf Lowering Routines
737  //===------------------------------------------------------------------===//
738 
739  /// Emit frame instruction to describe the layout of the frame.
740  void emitCFIInstruction(const MCCFIInstruction &Inst) const;
741 
742  /// Emit Dwarf abbreviation table.
743  template <typename T> void emitDwarfAbbrevs(const T &Abbrevs) const {
744  // For each abbreviation.
745  for (const auto &Abbrev : Abbrevs)
746  emitDwarfAbbrev(*Abbrev);
747 
748  // Mark end of abbreviations.
749  emitULEB128(0, "EOM(3)");
750  }
751 
752  void emitDwarfAbbrev(const DIEAbbrev &Abbrev) const;
753 
754  /// Recursively emit Dwarf DIE tree.
755  void emitDwarfDIE(const DIE &Die) const;
756 
757  //===------------------------------------------------------------------===//
758  // Inline Asm Support
759  //===------------------------------------------------------------------===//
760 
761  // These are hooks that targets can override to implement inline asm
762  // support. These should probably be moved out of AsmPrinter someday.
763 
764  /// Print information related to the specified machine instr that is
765  /// independent of the operand, and may be independent of the instr itself.
766  /// This can be useful for portably encoding the comment character or other
767  /// bits of target-specific knowledge into the asmstrings. The syntax used is
768  /// ${:comment}. Targets can override this to add support for their own
769  /// strange codes.
770  virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS,
771  StringRef Code) const;
772 
773  /// Print the MachineOperand as a symbol. Targets with complex handling of
774  /// symbol references should override the base implementation.
775  virtual void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &OS);
776 
777  /// Print the specified operand of MI, an INLINEASM instruction, using the
778  /// specified assembler variant. Targets should override this to format as
779  /// appropriate. This method can return true if the operand is erroneous.
780  virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
781  const char *ExtraCode, raw_ostream &OS);
782 
783  /// Print the specified operand of MI, an INLINEASM instruction, using the
784  /// specified assembler variant as an address. Targets should override this to
785  /// format as appropriate. This method can return true if the operand is
786  /// erroneous.
787  virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
788  const char *ExtraCode, raw_ostream &OS);
789 
790  /// Let the target do anything it needs to do before emitting inlineasm.
791  /// \p StartInfo - the subtarget info before parsing inline asm
792  virtual void emitInlineAsmStart() const;
793 
794  /// Let the target do anything it needs to do after emitting inlineasm.
795  /// This callback can be used restore the original mode in case the
796  /// inlineasm contains directives to switch modes.
797  /// \p StartInfo - the original subtarget info before inline asm
798  /// \p EndInfo - the final subtarget info after parsing the inline asm,
799  /// or NULL if the value is unknown.
800  virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
801  const MCSubtargetInfo *EndInfo) const;
802 
803  /// This emits visibility information about symbol, if this is supported by
804  /// the target.
805  void emitVisibility(MCSymbol *Sym, unsigned Visibility,
806  bool IsDefinition = true) const;
807 
808  /// This emits linkage information about \p GVSym based on \p GV, if this is
809  /// supported by the target.
810  virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const;
811 
812  /// Return the alignment for the specified \p GV.
813  static Align getGVAlignment(const GlobalObject *GV, const DataLayout &DL,
814  Align InAlign = Align(1));
815 
816 private:
817  /// Private state for PrintSpecial()
818  // Assign a unique ID to this machine instruction.
819  mutable const MachineInstr *LastMI = nullptr;
820  mutable unsigned LastFn = 0;
821  mutable unsigned Counter = ~0U;
822 
823  /// This method emits the header for the current function.
824  virtual void emitFunctionHeader();
825 
826  /// This method emits a comment next to header for the current function.
827  virtual void emitFunctionHeaderComment();
828 
829  /// Emit a blob of inline asm to the output streamer.
830  void
831  emitInlineAsm(StringRef Str, const MCSubtargetInfo &STI,
832  const MCTargetOptions &MCOptions,
833  const MDNode *LocMDNode = nullptr,
834  InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT) const;
835 
836  /// This method formats and emits the specified machine instruction that is an
837  /// inline asm.
838  void emitInlineAsm(const MachineInstr *MI) const;
839 
840  /// Add inline assembly info to the diagnostics machinery, so we can
841  /// emit file and position info. Returns SrcMgr memory buffer position.
842  unsigned addInlineAsmDiagBuffer(StringRef AsmStr,
843  const MDNode *LocMDNode) const;
844 
845  //===------------------------------------------------------------------===//
846  // Internal Implementation Details
847  //===------------------------------------------------------------------===//
848 
849  void emitJumpTableEntry(const MachineJumpTableInfo *MJTI,
850  const MachineBasicBlock *MBB, unsigned uid) const;
851  void emitLLVMUsedList(const ConstantArray *InitList);
852  /// Emit llvm.ident metadata in an '.ident' directive.
853  void emitModuleIdents(Module &M);
854  /// Emit bytes for llvm.commandline metadata.
855  void emitModuleCommandLines(Module &M);
856 
857  GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy &S);
858  void emitGlobalAlias(Module &M, const GlobalAlias &GA);
859  void emitGlobalIFunc(Module &M, const GlobalIFunc &GI);
860 
861  /// This method decides whether the specified basic block requires a label.
862  bool shouldEmitLabelForBasicBlock(const MachineBasicBlock &MBB) const;
863 
864 protected:
866  return false;
867  }
868 };
869 
870 } // end namespace llvm
871 
872 #endif // LLVM_CODEGEN_ASMPRINTER_H
llvm::AsmPrinter::emitLabelDifference
void emitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) const
Emit something like ".long Hi-Lo" where the size in bytes of the directive is specified by Size and H...
Definition: AsmPrinter.cpp:2777
llvm::AsmPrinter::isPositionIndependent
bool isPositionIndependent() const
Definition: AsmPrinter.cpp:374
llvm::AsmPrinter::NumUserHandlers
size_t NumUserHandlers
Definition: AsmPrinter.h:208
llvm::AsmPrinter::emitLabelDifferenceAsULEB128
void emitLabelDifferenceAsULEB128(const MCSymbol *Hi, const MCSymbol *Lo) const
Emit something like ".uleb128 Hi-Lo".
Definition: AsmPrinterDwarf.cpp:52
llvm::AsmPrinter::emitPCSectionsLabel
void emitPCSectionsLabel(const MachineFunction &MF, const MDNode &MD)
Emits a label as reference for PC sections.
Definition: AsmPrinter.cpp:1457
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:108
llvm::AsmPrinter::GlobalGOTEquivs
MapVector< const MCSymbol *, GOTEquivUsePair > GlobalGOTEquivs
Definition: AsmPrinter.h:143
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::AsmPrinter::getFunctionEnd
MCSymbol * getFunctionEnd() const
Definition: AsmPrinter.h:275
llvm::InlineAsm::AsmDialect
AsmDialect
Definition: InlineAsm.h:34
llvm::AsmPrinter::printOffset
void printOffset(int64_t Offset, raw_ostream &OS) const
This is just convenient handler for printing offsets.
Definition: AsmPrinter.cpp:3499
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::AsmPrinter::MBBSectionRange::BeginLabel
MCSymbol * BeginLabel
Definition: AsmPrinter.h:135
llvm::AsmPrinter::CFISection
CFISection
Definition: AsmPrinter.h:163
llvm::AsmPrinter::HandlerInfo::TimerGroupDescription
StringRef TimerGroupDescription
Definition: AsmPrinter.h:152
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:113
llvm::AsmPrinter::emitXXStructor
virtual void emitXXStructor(const DataLayout &DL, const Constant *CV)
Targets can override this to change how global constants that are part of a C++ static/global constru...
Definition: AsmPrinter.h:576
llvm::AsmPrinter::emitBasicBlockEnd
virtual void emitBasicBlockEnd(const MachineBasicBlock &MBB)
Targets can override this to emit stuff at the end of a basic block.
Definition: AsmPrinter.cpp:3729
llvm::remarks::RemarkStreamer
Definition: RemarkStreamer.h:44
llvm::AsmPrinter::lowerConstant
virtual const MCExpr * lowerConstant(const Constant *CV)
Lower the specified LLVM Constant to an MCExpr.
Definition: AsmPrinter.cpp:2833
llvm::GCStrategy
GCStrategy describes a garbage collector algorithm's code generation requirements,...
Definition: GCStrategy.h:64
llvm::AsmPrinter::emitULEB128
void emitULEB128(uint64_t Value, const char *Desc=nullptr, unsigned PadTo=0) const
Emit the specified unsigned leb128 value.
Definition: AsmPrinterDwarf.cpp:43
llvm::AsmPrinter::recordSled
void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind, uint8_t Version=0)
Definition: AsmPrinter.cpp:3958
llvm::cl::Prefix
@ Prefix
Definition: CommandLine.h:161
llvm::AsmPrinter::CurrentFnSymForSize
MCSymbol * CurrentFnSymForSize
The symbol used to represent the start of the current function for the purpose of calculating its siz...
Definition: AsmPrinter.h:130
llvm::AsmPrinter::createTempSymbol
MCSymbol * createTempSymbol(const Twine &Name) const
Definition: AsmPrinter.cpp:3516
llvm::AsmPrinter::getDwarfDebug
DwarfDebug * getDwarfDebug()
Definition: AsmPrinter.h:245
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
llvm::Function
Definition: Function.h:60
llvm::AsmPrinter::SledKind::CUSTOM_EVENT
@ CUSTOM_EVENT
llvm::AsmPrinter::MBBSectionRange
Map a basic block section ID to the begin and end symbols of that section which determine the section...
Definition: AsmPrinter.h:134
llvm::AsmPrinter::emitInlineAsmEnd
virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const
Let the target do anything it needs to do after emitting inlineasm.
Definition: AsmPrinterInlineAsm.cpp:525
llvm::InlineAsm::AD_ATT
@ AD_ATT
Definition: InlineAsm.h:35
llvm::AsmPrinter::MAI
const MCAsmInfo * MAI
Target Asm Printer information.
Definition: AsmPrinter.h:90
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1181
InlineAsm.h
llvm::AsmPrinter::getAddrLabelSymbolToEmit
ArrayRef< MCSymbol * > getAddrLabelSymbolToEmit(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
Definition: AsmPrinter.cpp:256
llvm::AsmPrinter::CFISection::Debug
@ Debug
Emit .debug_frame.
llvm::AsmPrinter::emitPatchableFunctionEntries
void emitPatchableFunctionEntries()
Definition: AsmPrinter.cpp:3971
llvm::AsmPrinter::Structor::Priority
int Priority
Definition: AsmPrinter.h:467
ErrorHandling.h
llvm::AsmPrinter::emitGlobalConstant
void emitGlobalConstant(const DataLayout &DL, const Constant *CV, AliasMapTy *AliasList=nullptr)
EmitGlobalConstant - Print a general LLVM constant to the .s file.
Definition: AsmPrinter.cpp:3474
llvm::AsmPrinter::emitSLEB128
void emitSLEB128(int64_t Value, const char *Desc=nullptr) const
Emit the specified signed leb128 value.
Definition: AsmPrinterDwarf.cpp:36
MapVector.h
llvm::GlobalVariable
Definition: GlobalVariable.h:39
llvm::AsmPrinter::XRayFunctionEntry::Function
const MCSymbol * Function
Definition: AsmPrinter.h:350
llvm::MachineOptimizationRemarkEmitter
The optimization diagnostic interface.
Definition: MachineOptimizationRemarkEmitter.h:151
llvm::AsmPrinter::XRayFunctionEntry::Sled
const MCSymbol * Sled
Definition: AsmPrinter.h:349
llvm::MachineFunctionPass
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Definition: MachineFunctionPass.h:30
llvm::GlobalAlias
Definition: GlobalAlias.h:28
llvm::AsmPrinter::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &Name, const GlobalValue *GV) const
Definition: AsmPrinter.cpp:650
llvm::AsmPrinter::doFinalization
bool doFinalization(Module &M) override
Shut down the asmprinter.
Definition: AsmPrinter.cpp:2056
llvm::MachineConstantPoolValue
Abstract base class for all machine specific constantpool value subclasses.
Definition: MachineConstantPool.h:35
llvm::AsmPrinter::PrintSymbolOperand
virtual void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &OS)
Print the MachineOperand as a symbol.
Definition: AsmPrinterInlineAsm.cpp:465
llvm::AsmPrinter::emitAlignment
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
Definition: AsmPrinter.cpp:2810
DenseMap.h
llvm::AsmPrinter::emitKCFITypeId
virtual void emitKCFITypeId(const MachineFunction &MF)
Definition: AsmPrinter.cpp:1381
llvm::AsmPrinter::getFunctionCFISectionType
CFISection getFunctionCFISectionType(const Function &F) const
Get the CFISection type for a function.
Definition: AsmPrinter.cpp:1248
llvm::AsmPrinter::getDwarfOffsetByteSize
unsigned int getDwarfOffsetByteSize() const
Returns 4 for DWARF32 and 8 for DWARF64.
Definition: AsmPrinter.cpp:4018
llvm::AsmPrinter::setDwarfVersion
void setDwarfVersion(uint16_t Version)
Definition: AsmPrinter.cpp:4010
llvm::AsmPrinter::Structor::ComdatKey
GlobalValue * ComdatKey
Definition: AsmPrinter.h:469
llvm::AsmPrinter::Structor::Func
Constant * Func
Definition: AsmPrinter.h:468
AsmPrinterHandler.h
llvm::AsmPrinter::SledKind
SledKind
Definition: AsmPrinter.h:335
llvm::AsmPrinter::emitDwarfOffset
void emitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const
Emit something like ".long Label + Offset" or ".quad Label + Offset" depending on the DWARF format.
Definition: AsmPrinterDwarf.cpp:188
llvm::AsmPrinter::CurrentFnBeginLocal
MCSymbol * CurrentFnBeginLocal
For dso_local functions, the current $local alias for the function.
Definition: AsmPrinter.h:203
llvm::AsmPrinter::Structor
llvm.global_ctors and llvm.global_dtors are arrays of Structor structs.
Definition: AsmPrinter.h:466
llvm::MapVector
This class implements a map that also provides access to all stored values in a deterministic order.
Definition: MapVector.h:37
llvm::DIE
A structured debug information entry.
Definition: DIE.h:739
llvm::AsmPrinter::emitLabelReference
void emitLabelReference(const MCSymbol *Label, unsigned Size, bool IsSectionRelative=false) const
Emit something like ".long Label" where the size in bytes of the directive is specified by Size and L...
Definition: AsmPrinter.h:656
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::GCMetadataPrinter
GCMetadataPrinter - Emits GC metadata as assembly code.
Definition: GCMetadataPrinter.h:39
llvm::AsmPrinter::ORE
MachineOptimizationRemarkEmitter * ORE
Optimization remark emitter.
Definition: AsmPrinter.h:114
llvm::AsmPrinter::XRayFunctionEntry::Fn
const class Function * Fn
Definition: AsmPrinter.h:353
llvm::AsmPrinter::CurrentFnDescSym
MCSymbol * CurrentFnDescSym
The symbol for the current function descriptor on AIX.
Definition: AsmPrinter.h:125
llvm::AsmPrinter::emitCallSiteOffset
void emitCallSiteOffset(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Encoding) const
Emit reference to a call site with a specified encoding.
Definition: AsmPrinterDwarf.cpp:207
llvm::StackMaps
Definition: StackMaps.h:251
llvm::DwarfStringPoolEntryRef
DwarfStringPoolEntryRef: Dwarf string pool entry reference.
Definition: DwarfStringPoolEntry.h:44
llvm::AsmPrinter::emitBBAddrMapSection
void emitBBAddrMapSection(const MachineFunction &MF)
Definition: AsmPrinter.cpp:1330
llvm::AsmPrinter::emitGlobalVariable
virtual void emitGlobalVariable(const GlobalVariable *GV)
Emit the specified global variable to the .s file.
Definition: AsmPrinter.cpp:677
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::MachineLoopInfo
Definition: MachineLoopInfo.h:89
llvm::AsmPrinter::EmitToStreamer
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
Definition: AsmPrinter.cpp:402
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::AsmPrinter::emitDwarfStringOffset
void emitDwarfStringOffset(DwarfStringPoolEntryRef S) const
Emit the 4-or 8-byte offset of a string from the start of its section.
Definition: AsmPrinter.h:699
llvm::TargetLoweringObjectFile
Definition: TargetLoweringObjectFile.h:45
llvm::AsmPrinter::emitKCFITrapEntry
void emitKCFITrapEntry(const MachineFunction &MF, const MCSymbol *Symbol)
Definition: AsmPrinter.cpp:1364
llvm::AsmPrinter::GOTEquivUsePair
std::pair< const GlobalVariable *, unsigned > GOTEquivUsePair
Map global GOT equivalent MCSymbols to GlobalVariables and keep track of its number of uses by other ...
Definition: AsmPrinter.h:142
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:212
llvm::DIEAbbrev
Dwarf abbreviation, describes the organization of a debug information object.
Definition: DIE.h:79
llvm::AsmPrinter::emitDwarfAbbrev
void emitDwarfAbbrev(const DIEAbbrev &Abbrev) const
Definition: AsmPrinterDwarf.cpp:320
llvm::AsmPrinter::emitLinkage
virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const
This emits linkage information about GVSym based on GV, if this is supported by the target.
Definition: AsmPrinter.cpp:610
llvm::ISD::Constant
@ Constant
Definition: ISDOpcodes.h:76
llvm::AsmPrinter::XRayFunctionEntry::Version
uint8_t Version
Definition: AsmPrinter.h:354
llvm::AsmPrinter::OutStreamer
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
Definition: AsmPrinter.h:99
llvm::AsmPrinter::PrintAsmMemoryOperand
virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...
Definition: AsmPrinterInlineAsm.cpp:517
llvm::AsmPrinter::addAsmPrinterHandler
void addAsmPrinterHandler(HandlerInfo Handler)
Definition: AsmPrinter.h:525
llvm::GlobalObject
Definition: GlobalObject.h:27
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition: PassAnalysisSupport.h:47
llvm::AsmPrinter::SetupMachineFunction
virtual void SetupMachineFunction(MachineFunction &MF)
This should be called when a new MachineFunction is being processed from runOnMachineFunction.
Definition: AsmPrinter.cpp:2312
llvm::AsmPrinter::emitFunctionEntryLabel
virtual void emitFunctionEntryLabel()
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
Definition: AsmPrinter.cpp:1033
llvm::AsmPrinter::Structor::Structor
Structor()=default
llvm::AsmPrinter::emitStartOfAsmFile
virtual void emitStartOfAsmFile(Module &)
This virtual method can be overridden by targets that want to emit something at the start of their fi...
Definition: AsmPrinter.h:535
llvm::AsmPrinter::isBlockOnlyReachableByFallthrough
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const
Return true if the basic block has exactly one predecessor and the control transfer mechanism between...
Definition: AsmPrinter.cpp:3777
DenseSet.h
remarks
annotation remarks
Definition: AnnotationRemarks.cpp:114
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition: MachineOperand.h:48
llvm::ConstantArray
ConstantArray - Constant Array Declarations.
Definition: Constants.h:410
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:74
llvm::AsmPrinter::emitInstruction
virtual void emitInstruction(const MachineInstr *)
Targets should implement this to emit instructions.
Definition: AsmPrinter.h:559
llvm::AsmPrinter::MLI
MachineLoopInfo * MLI
This is a pointer to the current MachineLoopInfo.
Definition: AsmPrinter.h:111
llvm::AsmPrinter::getDwarfDebug
DwarfDebug * getDwarfDebug() const
Definition: AsmPrinter.h:246
llvm::AsmPrinter::CurrentFnSym
MCSymbol * CurrentFnSym
The symbol for the current function.
Definition: AsmPrinter.h:121
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::AsmPrinter::emitEndOfAsmFile
virtual void emitEndOfAsmFile(Module &)
This virtual method can be overridden by targets that want to emit something at the end of their file...
Definition: AsmPrinter.h:539
llvm::AsmPrinter::getModuleCFISectionType
CFISection getModuleCFISectionType() const
Get the CFISection type for the module.
Definition: AsmPrinter.h:434
DwarfStringPoolEntry.h
llvm::IndexedInstrProf::Version
const uint64_t Version
Definition: InstrProf.h:1056
llvm::AsmPrinter::XRayFunctionEntry::AlwaysInstrument
bool AlwaysInstrument
Definition: AsmPrinter.h:352
llvm::AsmPrinter::emitFunctionBodyStart
virtual void emitFunctionBodyStart()
Targets can override this to emit stuff before the first basic block in the function.
Definition: AsmPrinter.h:543
llvm::AsmPrinter::SM
StackMaps SM
Definition: AsmPrinter.h:210
llvm::AsmPrinter::emitDwarfAbbrevs
void emitDwarfAbbrevs(const T &Abbrevs) const
Emit Dwarf abbreviation table.
Definition: AsmPrinter.h:743
llvm::AsmPrinter::emitDwarfSymbolReference
void emitDwarfSymbolReference(const MCSymbol *Label, bool ForceOffset=false) const
Emit a reference to a symbol for use in dwarf.
Definition: AsmPrinterDwarf.cpp:154
llvm::AsmPrinter::CurrentPatchableFunctionEntrySym
MCSymbol * CurrentPatchableFunctionEntrySym
The symbol for the entry in __patchable_function_entires.
Definition: AsmPrinter.h:117
Align
uint64_t Align
Definition: ELFObjHandler.cpp:81
llvm::AsmPrinter::emitInt8
void emitInt8(int Value) const
Emit a byte directive and value.
Definition: AsmPrinter.cpp:2761
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::AsmPrinter::shouldEmitWeakSwiftAsyncExtendedFramePointerFlags
virtual bool shouldEmitWeakSwiftAsyncExtendedFramePointerFlags() const
Definition: AsmPrinter.h:865
llvm::AsmPrinter::HandlerInfo::TimerDescription
StringRef TimerDescription
Definition: AsmPrinter.h:150
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AsmPrinter::getFunctionBegin
MCSymbol * getFunctionBegin() const
Definition: AsmPrinter.h:274
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::AsmPrinter::emitBasicBlockStart
virtual void emitBasicBlockStart(const MachineBasicBlock &MBB)
Targets can override this to emit stuff at the start of a basic block.
Definition: AsmPrinter.cpp:3649
llvm::MCCFIInstruction
Definition: MCDwarf.h:478
llvm::AsmPrinter::getPointerSize
unsigned getPointerSize() const
Return the pointer size from the TargetMachine.
Definition: AsmPrinter.cpp:393
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:94
llvm::AsmPrinter::XRayFunctionEntry::Kind
SledKind Kind
Definition: AsmPrinter.h:351
llvm::AsmPrinter::HandlerInfo::Handler
std::unique_ptr< AsmPrinterHandler > Handler
Definition: AsmPrinter.h:148
llvm::AsmPrinter::Handlers
std::vector< HandlerInfo > Handlers
A vector of all debug/EH info emitters we should use.
Definition: AsmPrinter.h:207
llvm::AsmPrinter::CFISection::None
@ None
Do not emit either .eh_frame or .debug_frame.
llvm::ISD::BlockAddress
@ BlockAddress
Definition: ISDOpcodes.h:84
llvm::AsmPrinter::AsmPrinter
AsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
Definition: AsmPrinter.cpp:355
llvm::AsmPrinter::emitMachineConstantPoolValue
virtual void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV)
Definition: AsmPrinter.cpp:3494
llvm::PseudoProbeHandler
Definition: PseudoProbePrinter.h:24
llvm::AsmPrinter::emitFrameAlloc
void emitFrameAlloc(const MachineInstr &MI)
Definition: AsmPrinter.cpp:1303
llvm::AsmPrinter::GetJTSetSymbol
MCSymbol * GetJTSetSymbol(unsigned UID, unsigned MBBID) const
Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter.
Definition: AsmPrinter.cpp:3564
llvm::AsmPrinter::emitInt64
void emitInt64(uint64_t Value) const
Emit a long long directive and value.
Definition: AsmPrinter.cpp:2770
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::DwarfStringPoolEntry
Data for a string pool entry.
Definition: DwarfStringPoolEntry.h:20
llvm::AsmPrinter::PrintSpecial
virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS, StringRef Code) const
Print information related to the specified machine instr that is independent of the operand,...
Definition: AsmPrinterInlineAsm.cpp:438
llvm::AsmPrinter::GetCPISymbol
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
Definition: AsmPrinter.cpp:3530
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:66
llvm::DwarfDebug
Collects and handles dwarf debug information.
Definition: DwarfDebug.h:294
llvm::AsmPrinter::emitLabelPlusOffset
void emitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset, unsigned Size, bool IsSectionRelative=false) const
Emit something like ".long Label+Offset" where the size in bytes of the directive is specified by Siz...
Definition: AsmPrinter.cpp:2785
uint64_t
llvm::AsmPrinter::needsCFIForDebug
bool needsCFIForDebug() const
Since emitting CFI unwind information is entangled with supporting the exceptions,...
Definition: AsmPrinter.cpp:1272
llvm::AsmPrinter::GetSizeOfEncodedValue
unsigned GetSizeOfEncodedValue(unsigned Encoding) const
Return the size of the encoding in bytes.
Definition: AsmPrinterDwarf.cpp:125
llvm::AsmPrinter::GetBlockAddressSymbol
MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Definition: AsmPrinter.cpp:3520
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::AsmPrinter::getSymbolPreferLocal
MCSymbol * getSymbolPreferLocal(const GlobalValue &GV) const
Similar to getSymbol() but preferred for references.
Definition: AsmPrinter.cpp:659
llvm::DenseMap
Definition: DenseMap.h:714
llvm::AsmPrinter::HandlerInfo::HandlerInfo
HandlerInfo(std::unique_ptr< AsmPrinterHandler > Handler, StringRef TimerName, StringRef TimerDescription, StringRef TimerGroupName, StringRef TimerGroupDescription)
Definition: AsmPrinter.h:154
llvm::AsmPrinter::needsSEHMoves
bool needsSEHMoves()
Definition: AsmPrinter.cpp:1268
llvm::dwarf::FormParams
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:653
MachineFunctionPass.h
llvm::AsmPrinter::emitJumpTableInfo
virtual void emitJumpTableInfo()
Print assembly representations of the jump tables used by the current function to the current output ...
Definition: AsmPrinter.cpp:2456
llvm::AsmPrinter::getFunctionFrameSymbol
virtual const MCSymbol * getFunctionFrameSymbol() const
Return symbol for the function pseudo stack if the stack frame is not a register based.
Definition: AsmPrinter.h:272
llvm::AsmPrinter::getSymbol
MCSymbol * getSymbol(const GlobalValue *GV) const
Definition: AsmPrinter.cpp:655
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
llvm::AsmPrinter::emitDwarfUnitLength
void emitDwarfUnitLength(uint64_t Length, const Twine &Comment) const
Emit a unit length field.
Definition: AsmPrinterDwarf.cpp:197
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1666
llvm::AsmPrinter::getMBBExceptionSym
MCSymbol * getMBBExceptionSym(const MachineBasicBlock &MBB)
Definition: AsmPrinter.cpp:2305
llvm::AsmPrinter::MF
MachineFunction * MF
The current machine function.
Definition: AsmPrinter.h:102
llvm::AsmPrinter::OutContext
MCContext & OutContext
This is the context for the output file that we are streaming.
Definition: AsmPrinter.h:94
llvm::ISD::BasicBlock
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:71
llvm::AsmPrinter::emitRemarksSection
void emitRemarksSection(remarks::RemarkStreamer &RS)
Definition: AsmPrinter.cpp:2028
llvm::AsmPrinter::emitImplicitDef
virtual void emitImplicitDef(const MachineInstr *MI) const
Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode.
Definition: AsmPrinter.cpp:1093
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::MDNode
Metadata node.
Definition: Metadata.h:944
llvm::MCTargetOptions
Definition: MCTargetOptions.h:37
llvm::AsmPrinter::emitSpecialLLVMGlobal
bool emitSpecialLLVMGlobal(const GlobalVariable *GV)
Check to see if the specified global is a special global used by LLVM.
Definition: AsmPrinter.cpp:2597
llvm::AsmPrinter::emitDwarfLengthOrOffset
void emitDwarfLengthOrOffset(uint64_t Value) const
Emit 32- or 64-bit value depending on the DWARF format.
Definition: AsmPrinterDwarf.cpp:192
llvm::AsmPrinter::XRayFunctionEntry
Definition: AsmPrinter.h:348
llvm::AsmPrinter::computeGlobalGOTEquivs
void computeGlobalGOTEquivs(Module &M)
Unnamed constant global variables solely contaning a pointer to another globals variable act like a g...
Definition: AsmPrinter.cpp:1892
llvm::AsmPrinter::MDT
MachineDominatorTree * MDT
This is a pointer to the current MachineDominatorTree.
Definition: AsmPrinter.h:108
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::AsmPrinter::emitCFIInstruction
void emitCFIInstruction(const MachineInstr &MI)
Definition: AsmPrinter.cpp:1277
llvm::AsmPrinter::emitDebugValue
virtual void emitDebugValue(const MCExpr *Value, unsigned Size) const
Emit the directive and value for debug thread local expression.
Definition: AsmPrinter.cpp:875
llvm::AsmPrinter::runOnMachineFunction
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
Definition: AsmPrinter.h:387
llvm::BlockAddress
The address of a basic block.
Definition: Constants.h:849
llvm::AsmPrinter::GetExternalSymbolSymbol
MCSymbol * GetExternalSymbolSymbol(StringRef Sym) const
Return the MCSymbol for the specified ExternalSymbol.
Definition: AsmPrinter.cpp:3577
llvm::AsmPrinter::emitGlobalGOTEquivs
void emitGlobalGOTEquivs()
Constant expressions using GOT equivalent globals may not be eligible for PC relative GOT entry conve...
Definition: AsmPrinter.cpp:1909
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::AsmPrinter::SledKind::TYPED_EVENT
@ TYPED_EVENT
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Dwarf.h
llvm::AsmPrinter::takeDeletedSymbolsForFunction
void takeDeletedSymbolsForFunction(const Function *F, std::vector< MCSymbol * > &Result)
If the specified function has had any references to address-taken blocks generated,...
Definition: AsmPrinter.cpp:264
llvm::AsmPrinter::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
Record analysis usage.
Definition: AsmPrinter.cpp:424
llvm::AsmPrinter::GetJTISymbol
MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const
Return the symbol for the specified jump table entry.
Definition: AsmPrinter.cpp:3558
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::AsmPrinter::SledKind::FUNCTION_EXIT
@ FUNCTION_EXIT
llvm::AsmPrinter::preprocessXXStructorList
void preprocessXXStructorList(const DataLayout &DL, const Constant *List, SmallVector< Structor, 8 > &Structors)
This method gathers an array of Structors and then sorts them out by Priority.
Definition: AsmPrinter.cpp:2642
llvm::AsmPrinter::SledKind::LOG_ARGS_ENTER
@ LOG_ARGS_ENTER
llvm::AsmPrinter::Sleds
SmallVector< XRayFunctionEntry, 4 > Sleds
Definition: AsmPrinter.h:360
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::AsmPrinter::getAddrLabelSymbol
MCSymbol * getAddrLabelSymbol(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
Definition: AsmPrinter.h:284
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::AsmPrinter::HandlerInfo::TimerGroupName
StringRef TimerGroupName
Definition: AsmPrinter.h:151
llvm::AsmPrinter::getISAEncoding
virtual unsigned getISAEncoding()
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
Definition: AsmPrinter.h:727
llvm::AsmPrinter::getUnitLengthFieldByteSize
unsigned int getUnitLengthFieldByteSize() const
Returns 4 for DWARF32 and 12 for DWARF64.
Definition: AsmPrinter.cpp:4029
llvm::AsmPrinter::emitStackUsage
void emitStackUsage(const MachineFunction &MF)
Definition: AsmPrinter.cpp:1425
llvm::AsmPrinter::MMI
MachineModuleInfo * MMI
This is a pointer to the current MachineModuleInfo.
Definition: AsmPrinter.h:105
llvm::AsmPrinter::SledKind::TAIL_CALL
@ TAIL_CALL
llvm::AsmPrinter::getGVAlignment
static Align getGVAlignment(const GlobalObject *GV, const DataLayout &DL, Align InAlign=Align(1))
Return the alignment for the specified GV.
Definition: AsmPrinter.cpp:331
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::AsmPrinter::emitPseudoProbe
void emitPseudoProbe(const MachineInstr &MI)
Definition: AsmPrinter.cpp:1388
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
std
Definition: BitVector.h:851
uint16_t
llvm::AsmPrinter::emitNops
void emitNops(unsigned N)
Emit N NOP instructions.
Definition: AsmPrinter.cpp:3506
llvm::AsmPrinter::getSubtargetInfo
const MCSubtargetInfo & getSubtargetInfo() const
Return information about subtarget.
Definition: AsmPrinter.cpp:397
llvm::AsmPrinter::HandlerInfo
struct HandlerInfo and Handlers permit users or target extended AsmPrinter to add their own handlers.
Definition: AsmPrinter.h:147
llvm::AsmPrinter::isDwarf64
bool isDwarf64() const
Definition: AsmPrinter.cpp:4014
llvm::AsmPrinter::emitInlineAsmStart
virtual void emitInlineAsmStart() const
Let the target do anything it needs to do before emitting inlineasm.
Definition: AsmPrinterInlineAsm.cpp:523
llvm::AsmPrinter::emitStackSizeSection
void emitStackSizeSection(const MachineFunction &MF)
Definition: AsmPrinter.cpp:1399
llvm::AsmPrinter::HandlerInfo::TimerName
StringRef TimerName
Definition: AsmPrinter.h:149
llvm::AsmPrinter::getDwarfVersion
uint16_t getDwarfVersion() const
Definition: AsmPrinter.cpp:4006
llvm::AsmPrinter::emitStackMaps
void emitStackMaps()
Emit the stack maps.
Definition: AsmPrinter.cpp:3839
StackMaps.h
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:84
llvm::AsmPrinter::emitVisibility
void emitVisibility(MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const
This emits visibility information about symbol, if this is supported by the target.
Definition: AsmPrinter.cpp:3737
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::AsmPrinter::emitInt32
void emitInt32(int Value) const
Emit a long directive and value.
Definition: AsmPrinter.cpp:2767
llvm::AsmPrinter::emitTTypeReference
virtual void emitTTypeReference(const GlobalValue *GV, unsigned Encoding)
Emit reference to a ttype global with a specified encoding.
Definition: AsmPrinterDwarf.cpp:143
llvm::AsmPrinter::MBBSectionRanges
MapVector< unsigned, MBBSectionRange > MBBSectionRanges
Definition: AsmPrinter.h:138
llvm::AsmPrinter::TM
TargetMachine & TM
Target machine description.
Definition: AsmPrinter.h:87
SmallVector.h
llvm::AsmPrinter::getSymbolWithGlobalValueBase
MCSymbol * getSymbolWithGlobalValueBase(const GlobalValue *GV, StringRef Suffix) const
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffi...
Definition: AsmPrinter.cpp:3571
llvm::AsmPrinter::getObjFileLowering
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
Definition: AsmPrinter.cpp:383
N
#define N
llvm::AsmPrinter::emitFunctionBody
void emitFunctionBody()
This method emits the body and trailer for a function.
Definition: AsmPrinter.cpp:1550
llvm::AsmPrinter::emitFunctionDescriptor
virtual void emitFunctionDescriptor()
Definition: AsmPrinter.h:568
llvm::AsmPrinter::CurrentFnBegin
MCSymbol * CurrentFnBegin
Definition: AsmPrinter.h:200
llvm::AsmPrinter::~AsmPrinter
~AsmPrinter() override
Definition: AsmPrinter.cpp:362
llvm::AsmPrinter::getDataLayout
const DataLayout & getDataLayout() const
Return information about data layout.
Definition: AsmPrinter.cpp:387
llvm::AsmPrinter::emitDwarfStringOffset
void emitDwarfStringOffset(DwarfStringPoolEntry S) const
Emit the 4- or 8-byte offset of a string from the start of its section.
Definition: AsmPrinterDwarf.cpp:177
llvm::AsmPrinter::SledKind::FUNCTION_ENTER
@ FUNCTION_ENTER
llvm::SmallVectorImpl< char >
llvm::AsmPrinter::MBBSectionRange::EndLabel
MCSymbol * EndLabel
Definition: AsmPrinter.h:135
llvm::AsmPrinter::emitPCSections
void emitPCSections(const MachineFunction &MF)
Emits the PC sections collected from instructions.
Definition: AsmPrinter.cpp:1464
llvm::AsmPrinter::getCurrentSection
const MCSection * getCurrentSection() const
Return the current section we are emitting to.
Definition: AsmPrinter.cpp:420
llvm::AsmPrinter::emitDwarfDIE
void emitDwarfDIE(const DIE &Die) const
Recursively emit Dwarf DIE tree.
Definition: AsmPrinterDwarf.cpp:285
BB
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
Definition: README.txt:39
llvm::AsmPrinter::emitInitialRawDwarfLocDirective
void emitInitialRawDwarfLocDirective(const MachineFunction &MF)
Emits inital debug location directive.
Definition: AsmPrinter.cpp:406
llvm::AsmPrinter::emitXRayTable
void emitXRayTable()
Emit a table with all XRay instrumentation points.
Definition: AsmPrinter.cpp:3879
llvm::AsmPrinter::emitCallSiteValue
void emitCallSiteValue(uint64_t Value, unsigned Encoding) const
Emit an integer value corresponding to the call site encoding.
Definition: AsmPrinterDwarf.cpp:216
llvm::MachineJumpTableInfo
Definition: MachineJumpTableInfo.h:42
llvm::AsmPrinter::isVerbose
bool isVerbose() const
Return true if assembly output should contain comments.
Definition: AsmPrinter.h:265
llvm::AsmPrinter::emitFunctionBodyEnd
virtual void emitFunctionBodyEnd()
Targets can override this to emit stuff after the last basic block in the function.
Definition: AsmPrinter.h:547
llvm::MachineDominatorTree
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
Definition: MachineDominators.h:51
llvm::GlobalIFunc
Definition: GlobalIFunc.h:34
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76
llvm::AsmPrinter::getFunctionNumber
unsigned getFunctionNumber() const
Return a unique ID for the current function.
Definition: AsmPrinter.cpp:379
llvm::AsmPrinter::emitEncodingByte
void emitEncodingByte(unsigned Val, const char *Desc=nullptr) const
Emit a .byte 42 directive that corresponds to an encoding.
Definition: AsmPrinterDwarf.cpp:112
llvm::AsmPrinter::CFISection::EH
@ EH
Emit .eh_frame.
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::AsmPrinter::emitInt16
void emitInt16(int Value) const
Emit a short directive and value.
Definition: AsmPrinter.cpp:2764
llvm::AsmPrinter::emitXXStructorList
virtual void emitXXStructorList(const DataLayout &DL, const Constant *List, bool IsCtor)
This method emits llvm.global_ctors or llvm.global_dtors list.
Definition: AsmPrinter.cpp:2679
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::AsmPrinter::PrintAsmOperand
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
Definition: AsmPrinterInlineAsm.cpp:475
llvm::AsmPrinter::XRayFunctionEntry::emit
void emit(int, MCStreamer *) const
Definition: AsmPrinter.cpp:3868
llvm::AsmPrinter::emitConstantPool
virtual void emitConstantPool()
Print to the current output stream assembly representations of the constants in the constant pool MCP...
Definition: AsmPrinter.cpp:2379
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:172
llvm::AsmPrinter::getDwarfFormParams
dwarf::FormParams getDwarfFormParams() const
Returns information about the byte size of DW_FORM values.
Definition: AsmPrinter.cpp:4023
llvm::AsmPrinter::doInitialization
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
Definition: AsmPrinter.cpp:431