LLVM API Documentation
#include <HexagonAsmPrinter.h>
Public Member Functions | |
HexagonAsmPrinter (TargetMachine &TM, MCStreamer &Streamer) | |
virtual const char * | getPassName () const |
bool | isBlockOnlyReachableByFallthrough (const MachineBasicBlock *MBB) const |
virtual void | EmitInstruction (const MachineInstr *MI) |
virtual void | EmitAlignment (unsigned NumBits, const GlobalValue *GV=0) const |
void | printOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
bool | PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) |
bool | PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS) |
void | printInstruction (const MachineInstr *MI, raw_ostream &O) |
void | printOp (const MachineOperand &MO, raw_ostream &O) |
void | printRegister (const MachineOperand &MO, bool R0AsZero, raw_ostream &O) |
void | printImmOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printNegImmOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printMEMriOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printFrameIndexOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printBranchOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printCallOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printAbsAddrOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printSymbolHi (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printSymbolLo (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printPredicateOperand (const MachineInstr *MI, unsigned OpNo, raw_ostream &O) |
void | printAddrModeBasePlusOffset (const MachineInstr *MI, int OpNo, raw_ostream &O) |
void | printGlobalOperand (const MachineInstr *MI, int OpNo, raw_ostream &O) |
void | printJumpTable (const MachineInstr *MI, int OpNo, raw_ostream &O) |
void | printConstantPool (const MachineInstr *MI, int OpNo, raw_ostream &O) |
![]() | |
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) |
virtual bool | runOnMachineFunction (MachineFunction &MF) |
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 | EmitEndOfAsmFile (Module &) |
virtual void | EmitFunctionBodyStart () |
virtual void | EmitFunctionBodyEnd () |
virtual void | EmitFunctionEntryLabel () |
virtual void | EmitMachineConstantPoolValue (MachineConstantPoolValue *MCPV) |
virtual void | EmitXXStructor (const Constant *CV) |
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) |
Static Public Member Functions | |
static const char * | getRegisterName (unsigned RegNo) |
![]() | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
Additional Inherited Members | |
![]() | |
enum | CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug } |
![]() | |
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 24 of file HexagonAsmPrinter.h.
|
inlineexplicit |
Definition at line 28 of file HexagonAsmPrinter.h.
References llvm::TargetMachine::getSubtarget().
|
virtual |
Definition at line 64 of file HexagonAsmPrinter.cpp.
References llvm::AsmPrinter::EmitAlignment(), llvm::MCStreamer::EmitRawText(), and llvm::AsmPrinter::OutStreamer.
|
virtual |
printMachineInstruction – Print out a single Hexagon MI in Darwin syntax to the current output stream.
Reimplemented from llvm::AsmPrinter.
Definition at line 199 of file HexagonAsmPrinter.cpp.
References llvm::TargetOpcode::DBG_VALUE, llvm::MCStreamer::EmitInstruction(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::getBundleSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), llvm::HexagonLowerToMC(), llvm::TargetOpcode::IMPLICIT_DEF, llvm::MachineInstr::isBundle(), llvm::A64CC::MI, llvm::AsmPrinter::MII, llvm::AsmPrinter::OutStreamer, llvm::HexagonMCInst::setPacketEnd(), and llvm::HexagonMCInst::setPacketStart().
|
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 33 of file HexagonAsmPrinter.h.
|
static |
Referenced by printFrameIndexOperand(), printMEMriOperand(), and printRegister().
|
virtual |
isBlockOnlyReachableByFallthough - Return true if the basic block has exactly one predecessor and the control transfer mechanism between the predecessor and this block is a fall-through.
Reimplemented from llvm::AsmPrinter.
Definition at line 117 of file HexagonAsmPrinter.cpp.
References llvm::MachineBasicBlock::hasAddressTaken(), and llvm::AsmPrinter::isBlockOnlyReachableByFallthrough().
|
inline |
Definition at line 116 of file HexagonAsmPrinter.h.
void HexagonAsmPrinter::printAddrModeBasePlusOffset | ( | const MachineInstr * | MI, |
int | OpNo, | ||
raw_ostream & | O | ||
) |
PrintUnmangledNameSafely - Print out the printable characters in the name. Don't print things like
or \0.
Definition at line 253 of file HexagonAsmPrinter.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and llvm::HexagonInstPrinter::getRegisterName().
|
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 164 of file HexagonAsmPrinter.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm_unreachable, and printOperand().
|
virtual |
PrintAsmOperand - Print out an operand for an inline asm expression.
Reimplemented from llvm::AsmPrinter.
Definition at line 127 of file HexagonAsmPrinter.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::AsmPrinter::PrintAsmOperand(), and printOperand().
|
inline |
Definition at line 101 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), and printOp().
|
inline |
Definition at line 112 of file HexagonAsmPrinter.h.
void HexagonAsmPrinter::printConstantPool | ( | const MachineInstr * | MI, |
int | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 287 of file HexagonAsmPrinter.cpp.
References llvm::AsmPrinter::GetCPISymbol(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getType(), and llvm::MachineOperand::MO_ConstantPoolIndex.
|
inline |
Definition at line 91 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and getRegisterName().
void HexagonAsmPrinter::printGlobalOperand | ( | const MachineInstr * | MI, |
int | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 264 of file HexagonAsmPrinter.cpp.
References llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOperand(), llvm::AsmPrinter::getSymbol(), llvm::MachineOperand::getType(), and llvm::MachineOperand::MO_GlobalAddress.
|
inline |
Definition at line 69 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getImm(), and llvm::MachineInstr::getOperand().
Referenced by printSymbolHi(), and printSymbolLo().
void llvm::HexagonAsmPrinter::printInstruction | ( | const MachineInstr * | MI, |
raw_ostream & | O | ||
) |
printInstruction - This method is automatically generated by tablegen from the instruction set description. This method returns true if the machine instruction was sufficiently described to print it, otherwise it returns false.
void HexagonAsmPrinter::printJumpTable | ( | const MachineInstr * | MI, |
int | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 277 of file HexagonAsmPrinter.cpp.
References llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getType(), and llvm::MachineOperand::MO_JumpTableIndex.
|
inline |
Definition at line 81 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and getRegisterName().
|
inline |
Definition at line 75 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getImm(), and llvm::MachineInstr::getOperand().
void llvm::HexagonAsmPrinter::printOp | ( | const MachineOperand & | MO, |
raw_ostream & | O | ||
) |
Referenced by printBranchOperand(), printSymbolHi(), and printSymbolLo().
void HexagonAsmPrinter::printOperand | ( | const MachineInstr * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 75 of file HexagonAsmPrinter.cpp.
References llvm::AsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::HexagonInstPrinter::getRegisterName(), llvm::AsmPrinter::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::MachineOperand::getType(), llvm_unreachable, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_Register, and llvm::AsmPrinter::printOffset().
Referenced by PrintAsmMemoryOperand(), and PrintAsmOperand().
void HexagonAsmPrinter::printPredicateOperand | ( | const MachineInstr * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 189 of file HexagonAsmPrinter.cpp.
References llvm_unreachable.
|
inline |
printRegister - Print register according to target requirements.
Definition at line 62 of file HexagonAsmPrinter.h.
References llvm::MachineOperand::getReg(), getRegisterName(), and llvm::TargetRegisterInfo::isPhysicalRegister().
|
inline |
Definition at line 120 of file HexagonAsmPrinter.h.
References llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), printImmOperand(), and printOp().
|
inline |
Definition at line 131 of file HexagonAsmPrinter.h.
References llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), printImmOperand(), and printOp().