LLVM API Documentation
#include <AArch64AsmPrinter.h>
Public Member Functions | |
AArch64AsmPrinter (TargetMachine &TM, MCStreamer &Streamer) | |
bool | lowerOperand (const MachineOperand &MO, MCOperand &MCOp) const |
MCOperand | lowerSymbolOperand (const MachineOperand &MO, const MCSymbol *Sym) const |
void | EmitInstruction (const MachineInstr *MI) |
EmitInstruction - Targets should implement this to emit instructions. More... | |
void | EmitEndOfAsmFile (Module &M) |
bool | PrintAsmOperand (const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O) |
bool | PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, raw_ostream &O) |
bool | printSymbolicAddress (const MachineOperand &MO, bool PrintImmediatePrefix, StringRef Suffix, raw_ostream &O) |
virtual const char * | getPassName () const |
virtual bool | runOnMachineFunction (MachineFunction &MF) |
![]() | |
virtual | ~AsmPrinter () |
const DwarfDebug * | getDwarfDebug () const |
bool | isVerbose () const |
unsigned | getFunctionNumber () const |
const TargetLoweringObjectFile & | getObjFileLowering () const |
getObjFileLowering - Return information about object file lowering. More... | |
const DataLayout & | getDataLayout () const |
getDataLayout - Return information about data layout. More... | |
StringRef | getTargetTriple () const |
getTargetTriple - Return the target triple string. More... | |
const MCSection * | getCurrentSection () const |
getCurrentSection() - Return the current section we are emitting to. More... | |
MCSymbol * | getSymbol (const GlobalValue *GV) const |
void | getAnalysisUsage (AnalysisUsage &AU) const |
bool | doInitialization (Module &M) |
bool | doFinalization (Module &M) |
void | SetupMachineFunction (MachineFunction &MF) |
void | EmitFunctionHeader () |
void | EmitFunctionBody () |
void | emitPrologLabel (const MachineInstr &MI) |
CFIMoveType | needsCFIMoves () |
bool | needsSEHMoves () |
bool | needsRelocationsForDwarfStringPool () const |
virtual void | EmitConstantPool () |
void | EmitJumpTableInfo () |
virtual void | EmitGlobalVariable (const GlobalVariable *GV) |
EmitGlobalVariable - Emit the specified global variable to the .s file. More... | |
bool | EmitSpecialLLVMGlobal (const GlobalVariable *GV) |
void | EmitAlignment (unsigned NumBits, const GlobalValue *GV=0) const |
void | EmitBasicBlockStart (const MachineBasicBlock *MBB) const |
void | EmitGlobalConstant (const Constant *CV) |
Print a general LLVM constant to the .s file. More... | |
virtual void | EmitStartOfAsmFile (Module &) |
virtual void | EmitFunctionBodyStart () |
virtual void | EmitFunctionBodyEnd () |
virtual void | EmitFunctionEntryLabel () |
virtual void | EmitMachineConstantPoolValue (MachineConstantPoolValue *MCPV) |
virtual void | EmitXXStructor (const Constant *CV) |
virtual bool | isBlockOnlyReachableByFallthrough (const MachineBasicBlock *MBB) const |
virtual void | emitImplicitDef (const MachineInstr *MI) const |
MCSymbol * | GetTempSymbol (StringRef Name, unsigned ID) const |
MCSymbol * | GetTempSymbol (StringRef Name) const |
MCSymbol * | GetSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix, bool ForcePrivate=true) const |
MCSymbol * | GetExternalSymbolSymbol (StringRef Sym) const |
MCSymbol * | GetCPISymbol (unsigned CPID) const |
GetCPISymbol - Return the symbol for the specified constant pool entry. More... | |
MCSymbol * | GetJTISymbol (unsigned JTID, bool isLinkerPrivate=false) const |
GetJTISymbol - Return the symbol for the specified jump table entry. More... | |
MCSymbol * | GetJTSetSymbol (unsigned UID, unsigned MBBID) const |
MCSymbol * | GetBlockAddressSymbol (const BlockAddress *BA) const |
MCSymbol * | GetBlockAddressSymbol (const BasicBlock *BB) const |
void | printOffset (int64_t Offset, raw_ostream &OS) const |
printOffset - This is just convenient handler for printing offsets. More... | |
void | EmitInt8 (int Value) const |
void | EmitInt16 (int Value) const |
void | EmitInt32 (int Value) const |
void | EmitLabelDifference (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) const |
void | EmitLabelOffsetDifference (const MCSymbol *Hi, uint64_t Offset, const MCSymbol *Lo, unsigned Size) const |
void | EmitLabelPlusOffset (const MCSymbol *Label, uint64_t Offset, unsigned Size, bool IsSectionRelative=false) const |
void | EmitLabelReference (const MCSymbol *Label, unsigned Size, bool IsSectionRelative=false) const |
void | EmitSLEB128 (int64_t Value, const char *Desc=0) const |
EmitSLEB128 - emit the specified signed leb128 value. More... | |
void | EmitULEB128 (uint64_t Value, const char *Desc=0, unsigned PadTo=0) const |
EmitULEB128 - emit the specified unsigned leb128 value. More... | |
void | EmitCFAByte (unsigned Val) const |
EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. More... | |
void | EmitEncodingByte (unsigned Val, const char *Desc=0) const |
unsigned | GetSizeOfEncodedValue (unsigned Encoding) const |
GetSizeOfEncodedValue - Return the size of the encoding in bytes. More... | |
void | EmitTTypeReference (const GlobalValue *GV, unsigned Encoding) const |
EmitReference - Emit reference to a ttype global with a specified encoding. More... | |
void | EmitSectionOffset (const MCSymbol *Label, const MCSymbol *SectionLabel) const |
virtual unsigned | getISAEncoding () |
virtual void | EmitDwarfRegOp (const MachineLocation &MLoc, bool Indirect) const |
EmitDwarfRegOp - Emit dwarf register operation. More... | |
void | emitCFIInstruction (const MCCFIInstruction &Inst) const |
Emit frame instruction to describe the layout of the frame. More... | |
virtual void | PrintSpecial (const MachineInstr *MI, raw_ostream &OS, const char *Code) const |
![]() | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const |
createPrinterPass - Get a function printer pass. More... | |
virtual void | assignPassManager (PMStack &PMS, PassManagerType T) |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. More... | |
![]() | |
Pass (PassKind K, char &pid) | |
virtual | ~Pass () |
PassKind | getPassKind () const |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual void | print (raw_ostream &O, const Module *M) const |
void | dump () const |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. More... | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | releaseMemory () |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
bool | mustPreserveAnalysisID (char &AID) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F) |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F) |
Additional Inherited Members | |
![]() | |
enum | CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug } |
![]() | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
![]() | |
TargetMachine & | TM |
const MCAsmInfo * | MAI |
const MCInstrInfo * | MII |
MCContext & | OutContext |
MCStreamer & | OutStreamer |
const MachineFunction * | MF |
The current machine function. More... | |
MachineModuleInfo * | MMI |
MMI - This is a pointer to the current MachineModuleInfo. More... | |
Mangler * | Mang |
MCSymbol * | CurrentFnSym |
MCSymbol * | CurrentFnSymForSize |
![]() | |
AsmPrinter (TargetMachine &TM, MCStreamer &Streamer) | |
![]() | |
MachineFunctionPass (char &ID) | |
Definition at line 27 of file AArch64AsmPrinter.h.
|
inlineexplicit |
Definition at line 38 of file AArch64AsmPrinter.h.
References llvm::TargetMachine::getSubtarget().
|
virtual |
EmitEndOfAsmFile - This virtual method can be overridden by targets that want to emit something at the end of their file.
Reimplemented from llvm::AsmPrinter.
Definition at line 274 of file AArch64AsmPrinter.cpp.
References llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitSymbolValue(), llvm::TargetMachine::getDataLayout(), llvm::MCObjectFileInfo::getDataRelSection(), llvm::MachineModuleInfoELF::GetGVStubList(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::DataLayout::getPointerSize(), llvm::AArch64Subtarget::isTargetELF(), llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutStreamer, llvm::MCStreamer::SwitchSection(), TD, and llvm::AsmPrinter::TM.
|
virtual |
EmitInstruction - Targets should implement this to emit instructions.
Reimplemented from llvm::AsmPrinter.
Definition at line 264 of file AArch64AsmPrinter.cpp.
References llvm::MCStreamer::EmitInstruction(), llvm::LowerAArch64MachineInstrToMCInst(), and llvm::AsmPrinter::OutStreamer.
|
inlinevirtual |
getPassName - Return a nice clean name for a pass. This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.
Reimplemented from llvm::Pass.
Definition at line 68 of file AArch64AsmPrinter.h.
bool AArch64AsmPrinter::lowerOperand | ( | const MachineOperand & | MO, |
MCOperand & | MCOp | ||
) | const |
Definition at line 99 of file AArch64MCInstLower.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::MCOperand::CreateExpr(), llvm::MCOperand::CreateFPImm(), llvm::MCOperand::CreateImm(), llvm::MCOperand::CreateReg(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getFPImm(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::AsmPrinter::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getType(), llvm::MachineOperand::isImplicit(), llvm::ConstantFP::isZero(), llvm_unreachable, lowerSymbolOperand(), llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FPImmediate, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_Register, llvm::MachineOperand::MO_RegisterMask, and llvm::AsmPrinter::OutContext.
Referenced by llvm::LowerAArch64MachineInstrToMCInst().
MCOperand AArch64AsmPrinter::lowerSymbolOperand | ( | const MachineOperand & | MO, |
const MCSymbol * | Sym | ||
) | const |
Definition at line 31 of file AArch64MCInstLower.cpp.
References llvm::MCConstantExpr::Create(), llvm::MCSymbolRefExpr::Create(), llvm::AArch64MCExpr::CreateABS_G0_NC(), llvm::AArch64MCExpr::CreateABS_G1_NC(), llvm::AArch64MCExpr::CreateABS_G2_NC(), llvm::AArch64MCExpr::CreateABS_G3(), llvm::MCBinaryExpr::CreateAdd(), llvm::AArch64MCExpr::CreateDTPREL_G0_NC(), llvm::AArch64MCExpr::CreateDTPREL_G1(), llvm::MCOperand::CreateExpr(), llvm::AArch64MCExpr::CreateGOT(), llvm::AArch64MCExpr::CreateGOTLo12(), llvm::AArch64MCExpr::CreateGOTTPREL(), llvm::AArch64MCExpr::CreateGOTTPRELLo12(), llvm::AArch64MCExpr::CreateLo12(), llvm::AArch64MCExpr::CreateTLSDesc(), llvm::AArch64MCExpr::CreateTLSDescLo12(), llvm::AArch64MCExpr::CreateTPREL_G0_NC(), llvm::AArch64MCExpr::CreateTPREL_G1(), llvm::MachineOperand::getOffset(), llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isJTI(), llvm_unreachable, llvm::AArch64II::MO_ABS_G0_NC, llvm::AArch64II::MO_ABS_G1_NC, llvm::AArch64II::MO_ABS_G2_NC, llvm::AArch64II::MO_ABS_G3, llvm::AArch64II::MO_DTPREL_G0_NC, llvm::AArch64II::MO_DTPREL_G1, llvm::AArch64II::MO_GOT, llvm::AArch64II::MO_GOT_LO12, llvm::AArch64II::MO_GOTTPREL, llvm::AArch64II::MO_GOTTPREL_LO12, llvm::AArch64II::MO_LO12, llvm::AArch64II::MO_NO_FLAG, llvm::AArch64II::MO_TLSDESC, llvm::AArch64II::MO_TLSDESC_LO12, llvm::AArch64II::MO_TPREL_G0_NC, llvm::AArch64II::MO_TPREL_G1, llvm::AsmPrinter::OutContext, and llvm::MCSymbolRefExpr::VK_None.
Referenced by lowerOperand().
|
virtual |
PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as an address. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.
Reimplemented from llvm::AsmPrinter.
Definition at line 248 of file AArch64AsmPrinter.cpp.
References llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::AArch64InstPrinter::getRegisterName(), and llvm::MachineOperand::isReg().
Referenced by PrintAsmOperand().
|
virtual |
PrintAsmOperand - Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.
PrintAsmOperand - Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. Targets should override this to format as appropriate.
Reimplemented from llvm::AsmPrinter.
Definition at line 145 of file AArch64AsmPrinter.cpp.
References llvm::MachineOperand::getFPImm(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getRegisterInfo(), llvm::AArch64InstPrinter::getRegisterName(), llvm::MachineFunction::getTarget(), llvm::MachineOperand::getType(), llvm::ConstantFP::isExactlyValue(), llvm_unreachable, llvm::AsmPrinter::MF, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FPImmediate, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_Register, PrintAsmMemoryOperand(), llvm::AsmPrinter::PrintAsmOperand(), printModifiedFPRAsmOperand(), printModifiedGPRAsmOperand(), and printSymbolicAddress().
bool AArch64AsmPrinter::printSymbolicAddress | ( | const MachineOperand & | MO, |
bool | PrintImmediatePrefix, | ||
StringRef | Suffix, | ||
raw_ostream & | O | ||
) |
printSymbolicAddress - Given some kind of reasonably bare symbolic reference, print out the appropriate asm string to represent it. If appropriate, a relocation-specifier will be produced, composed of a general class derived from the MO parameter and an instruction-specific suffix, provided in Suffix. E.g. ":got_lo12:" if a Suffix of "lo12" is given.
Definition at line 78 of file AArch64AsmPrinter.cpp.
References llvm::TLSModel::GeneralDynamic, llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::Intrinsic::getName(), llvm::TargetMachine::getRelocationModel(), llvm::AsmPrinter::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::TargetMachine::getTLSModel(), llvm::MachineOperand::getType(), llvm::AArch64Subtarget::GVIsIndirectSymbol(), llvm::TLSModel::InitialExec, llvm::TLSModel::LocalDynamic, llvm::TLSModel::LocalExec, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, and llvm::AsmPrinter::TM.
Referenced by PrintAsmOperand().
|
virtual |
runOnMachineFunction - Emit the specified function out to the OutStreamer.
Reimplemented from llvm::AsmPrinter.
Definition at line 297 of file AArch64AsmPrinter.cpp.
References llvm::AsmPrinter::runOnMachineFunction().