Go to the documentation of this file.
9 #ifndef LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
10 #define LLVM_LIB_TARGET_X86_X86ASMPRINTER_H
31 std::unique_ptr<MCCodeEmitter> CodeEmitter;
32 bool EmitFPOData =
false;
33 bool ShouldEmitWeakSwiftAsyncExtendedFramePointerFlags =
false;
43 class StackMapShadowTracker {
52 void reset(
unsigned RequiredSize) {
53 RequiredShadowSize = RequiredSize;
54 CurrentShadowSize = 0;
63 bool InShadow =
false;
70 unsigned RequiredShadowSize = 0, CurrentShadowSize = 0;
73 StackMapShadowTracker SMShadowTracker;
81 void EmitAndCountInstruction(
MCInst &Inst);
83 void LowerPATCHPOINT(
const MachineInstr &
MI, X86MCInstLower &MCIL);
84 void LowerSTATEPOINT(
const MachineInstr &
MI, X86MCInstLower &MCIL);
85 void LowerFAULTING_OP(
const MachineInstr &
MI, X86MCInstLower &MCIL);
86 void LowerPATCHABLE_OP(
const MachineInstr &
MI, X86MCInstLower &MCIL);
88 void LowerTlsAddr(X86MCInstLower &MCInstLowering,
const MachineInstr &
MI);
92 X86MCInstLower &MCIL);
93 void LowerPATCHABLE_RET(
const MachineInstr &
MI, X86MCInstLower &MCIL);
94 void LowerPATCHABLE_TAIL_CALL(
const MachineInstr &
MI, X86MCInstLower &MCIL);
95 void LowerPATCHABLE_EVENT_CALL(
const MachineInstr &
MI, X86MCInstLower &MCIL);
97 X86MCInstLower &MCIL);
99 void LowerFENTRY_CALL(
const MachineInstr &
MI, X86MCInstLower &MCIL);
115 const char *Modifier);
116 void PrintIntelMemReference(
const MachineInstr *
MI,
unsigned OpNo,
123 return "X86 Assembly Printer";
128 void emitStartOfAsmFile(
Module &M)
override;
130 void emitEndOfAsmFile(
Module &M)
override;
136 SMShadowTracker.emitShadowPadding(*OutStreamer, getSubtargetInfo());
145 SMShadowTracker.reset(0);
152 void emitFunctionBodyStart()
override;
153 void emitFunctionBodyEnd()
override;
156 return ShouldEmitWeakSwiftAsyncExtendedFramePointerFlags;
This is an optimization pass for GlobalISel generic memory operations.
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
virtual void emitBasicBlockEnd(const MachineBasicBlock &MBB)
Targets can override this to emit stuff at the end of a basic block.
void emitBasicBlockEnd(const MachineBasicBlock &MBB) override
Targets can override this to emit stuff at the end of a basic block.
Instances of this class represent a single low-level machine instruction.
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Streaming machine code generation interface.
bool shouldEmitWeakSwiftAsyncExtendedFramePointerFlags() const override
MachineOperand class - Representation of each machine instruction operand.
This class implements an extremely fast bulk output stream that can only output to a stream.
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
Representation of each machine instruction.
Primary interface to the complete machine description for the target machine.
A Module instance is used to store all the information related to an LLVM module.
StringRef - Represent a constant reference to a string, i.e.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library,...
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
MCCodeEmitter - Generic instruction encoding interface.
This class is intended to be used as a driving class for all asm writers.
const X86Subtarget & getSubtarget() const
const char LLVMTargetMachineRef TM
Generic base class for all target subtargets.
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.