10 #ifndef LLVM_LIB_TARGET_X86_X86ASMPRINTER_H 11 #define LLVM_LIB_TARGET_X86_X86ASMPRINTER_H 33 std::unique_ptr<MCCodeEmitter> CodeEmitter;
34 bool EmitFPOData =
false;
35 bool NeedsRetpoline =
false;
45 class StackMapShadowTracker {
54 void reset(
unsigned RequiredSize) {
55 RequiredShadowSize = RequiredSize;
56 CurrentShadowSize = 0;
65 bool InShadow =
false;
72 unsigned RequiredShadowSize = 0, CurrentShadowSize = 0;
75 StackMapShadowTracker SMShadowTracker;
83 void EmitAndCountInstruction(
MCInst &Inst);
85 void LowerPATCHPOINT(
const MachineInstr &MI, X86MCInstLower &MCIL);
86 void LowerSTATEPOINT(
const MachineInstr &MI, X86MCInstLower &MCIL);
87 void LowerFAULTING_OP(
const MachineInstr &MI, X86MCInstLower &MCIL);
88 void LowerPATCHABLE_OP(
const MachineInstr &MI, X86MCInstLower &MCIL);
90 void LowerTlsAddr(X86MCInstLower &MCInstLowering,
const MachineInstr &MI);
93 void LowerPATCHABLE_FUNCTION_ENTER(
const MachineInstr &MI,
94 X86MCInstLower &MCIL);
95 void LowerPATCHABLE_RET(
const MachineInstr &MI, X86MCInstLower &MCIL);
96 void LowerPATCHABLE_TAIL_CALL(
const MachineInstr &MI, X86MCInstLower &MCIL);
97 void LowerPATCHABLE_EVENT_CALL(
const MachineInstr &MI, X86MCInstLower &MCIL);
98 void LowerPATCHABLE_TYPED_EVENT_CALL(
const MachineInstr &MI,
99 X86MCInstLower &MCIL);
101 void LowerFENTRY_CALL(
const MachineInstr &MI, X86MCInstLower &MCIL);
110 return "X86 Assembly Printer";
115 void EmitStartOfAsmFile(
Module &M)
override;
117 void EmitEndOfAsmFile(
Module &M)
override;
122 AsmPrinter::EmitBasicBlockEnd(MBB);
123 SMShadowTracker.emitShadowPadding(*OutStreamer, getSubtargetInfo());
126 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
127 unsigned AsmVariant,
const char *ExtraCode,
129 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
130 unsigned AsmVariant,
const char *ExtraCode,
134 SMShadowTracker.reset(0);
137 return AsmPrinter::doInitialization(M);
141 void EmitFunctionBodyStart()
override;
142 void EmitFunctionBodyEnd()
override;
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
Instances of this class represent a single low-level machine instruction.
auto count(R &&Range, const E &Element) -> typename std::iterator_traits< decltype(adl_begin(Range))>::difference_type
Wrapper function around std::count to count the number of times an element Element occurs in the give...
Streaming machine code generation interface.
MCCodeEmitter - Generic instruction encoding interface.
This class is intended to be used as a driving class for all asm writers.
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Representation of each machine instruction.
void EmitBasicBlockEnd(const MachineBasicBlock &MBB) override
Targets can override this to emit stuff at the end of a basic block.
Generic base class for all target subtargets.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
const X86Subtarget & getSubtarget() const