LLVM
8.0.1
|
Target - Wrapper for Target specific information. More...
#include "llvm/Support/TargetRegistry.h"
Public Member Functions | |
Target ()=default | |
Target Information | |
const Target * | getNext () const |
const char * | getName () const |
getName - Get the target name. More... | |
const char * | getShortDescription () const |
getShortDescription - Get a short description of the target. More... | |
const char * | getBackendName () const |
getBackendName - Get the backend name. More... | |
Feature Predicates | |
bool | hasJIT () const |
hasJIT - Check if this targets supports the just-in-time compilation. More... | |
bool | hasTargetMachine () const |
hasTargetMachine - Check if this target supports code generation. More... | |
bool | hasMCAsmBackend () const |
hasMCAsmBackend - Check if this target supports .o generation. More... | |
bool | hasMCAsmParser () const |
hasMCAsmParser - Check if this target supports assembly parsing. More... | |
Feature Constructors | |
MCAsmInfo * | createMCAsmInfo (const MCRegisterInfo &MRI, StringRef TheTriple) const |
createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple. More... | |
MCInstrInfo * | createMCInstrInfo () const |
createMCInstrInfo - Create a MCInstrInfo implementation. More... | |
MCInstrAnalysis * | createMCInstrAnalysis (const MCInstrInfo *Info) const |
createMCInstrAnalysis - Create a MCInstrAnalysis implementation. More... | |
MCRegisterInfo * | createMCRegInfo (StringRef TT) const |
createMCRegInfo - Create a MCRegisterInfo implementation. More... | |
MCSubtargetInfo * | createMCSubtargetInfo (StringRef TheTriple, StringRef CPU, StringRef Features) const |
createMCSubtargetInfo - Create a MCSubtargetInfo implementation. More... | |
TargetMachine * | createTargetMachine (StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM=None, CodeGenOpt::Level OL=CodeGenOpt::Default, bool JIT=false) const |
createTargetMachine - Create a target specific machine implementation for the specified Triple . More... | |
MCAsmBackend * | createMCAsmBackend (const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) const |
createMCAsmBackend - Create a target specific assembly parser. More... | |
MCTargetAsmParser * | createMCAsmParser (const MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) const |
createMCAsmParser - Create a target specific assembly parser. More... | |
AsmPrinter * | createAsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer) const |
createAsmPrinter - Create a target specific assembly printer pass. More... | |
MCDisassembler * | createMCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx) const |
MCInstPrinter * | createMCInstPrinter (const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) const |
MCCodeEmitter * | createMCCodeEmitter (const MCInstrInfo &II, const MCRegisterInfo &MRI, MCContext &Ctx) const |
createMCCodeEmitter - Create a target specific code emitter. More... | |
MCStreamer * | createMCObjectStreamer (const Triple &T, MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter, const MCSubtargetInfo &STI, bool RelaxAll, bool IncrementalLinkerCompatible, bool DWARFMustBeAtTheEnd) const |
Create a target specific MCStreamer. More... | |
MCStreamer * | createAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, bool IsVerboseAsm, bool UseDwarfDirectory, MCInstPrinter *InstPrint, std::unique_ptr< MCCodeEmitter > &&CE, std::unique_ptr< MCAsmBackend > &&TAB, bool ShowInst) const |
MCTargetStreamer * | createAsmTargetStreamer (MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool IsVerboseAsm) const |
MCStreamer * | createNullStreamer (MCContext &Ctx) const |
MCTargetStreamer * | createNullTargetStreamer (MCStreamer &S) const |
MCRelocationInfo * | createMCRelocationInfo (StringRef TT, MCContext &Ctx) const |
createMCRelocationInfo - Create a target specific MCRelocationInfo. More... | |
MCSymbolizer * | createMCSymbolizer (StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo) const |
createMCSymbolizer - Create a target specific MCSymbolizer. More... | |
Friends | |
struct | TargetRegistry |
Target - Wrapper for Target specific information.
For registration purposes, this is a POD type so that targets can be registered without the use of static constructors.
Targets should implement a single global instance of this class (which will be zero initialized), and pass that instance to the TargetRegistry as part of their initialization.
Definition at line 120 of file TargetRegistry.h.
using llvm::Target::ArchMatchFnTy = bool (*)(Triple::ArchType Arch) |
Definition at line 124 of file TargetRegistry.h.
using llvm::Target::AsmPrinterCtorTy = AsmPrinter *(*)( TargetMachine &TM, std::unique_ptr<MCStreamer> &&Streamer) |
Definition at line 142 of file TargetRegistry.h.
using llvm::Target::AsmTargetStreamerCtorTy = MCTargetStreamer *(*)( MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool IsVerboseAsm) |
Definition at line 184 of file TargetRegistry.h.
using llvm::Target::COFFStreamerCtorTy = MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB, std::unique_ptr<MCObjectWriter> &&OW, std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll, bool IncrementalLinkerCompatible) |
Definition at line 175 of file TargetRegistry.h.
using llvm::Target::ELFStreamerCtorTy = MCStreamer *(*)(const Triple &T, MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB, std::unique_ptr<MCObjectWriter> &&OW, std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll) |
Definition at line 165 of file TargetRegistry.h.
using llvm::Target::MachOStreamerCtorTy = MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB, std::unique_ptr<MCObjectWriter> &&OW, std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll, bool DWARFMustBeAtTheEnd) |
Definition at line 170 of file TargetRegistry.h.
using llvm::Target::MCAsmBackendCtorTy = MCAsmBackend *(*)(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) |
Definition at line 146 of file TargetRegistry.h.
using llvm::Target::MCAsmInfoCtorFnTy = MCAsmInfo *(*)(const MCRegisterInfo &MRI, const Triple &TT) |
Definition at line 127 of file TargetRegistry.h.
using llvm::Target::MCAsmParserCtorTy = MCTargetAsmParser *(*)( const MCSubtargetInfo &STI, MCAsmParser &P, const MCInstrInfo &MII, const MCTargetOptions &Options) |
Definition at line 149 of file TargetRegistry.h.
using llvm::Target::MCCodeEmitterCtorTy = MCCodeEmitter *(*)(const MCInstrInfo &II, const MCRegisterInfo &MRI, MCContext &Ctx) |
Definition at line 160 of file TargetRegistry.h.
using llvm::Target::MCDisassemblerCtorTy = MCDisassembler *(*)(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) |
Definition at line 152 of file TargetRegistry.h.
using llvm::Target::MCInstPrinterCtorTy = MCInstPrinter *(*)(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) |
Definition at line 157 of file TargetRegistry.h.
using llvm::Target::MCInstrAnalysisCtorFnTy = MCInstrAnalysis *(*)(const MCInstrInfo *Info) |
Definition at line 129 of file TargetRegistry.h.
using llvm::Target::MCInstrInfoCtorFnTy = MCInstrInfo *(*)() |
Definition at line 128 of file TargetRegistry.h.
using llvm::Target::MCRegInfoCtorFnTy = MCRegisterInfo *(*)(const Triple &TT) |
Definition at line 130 of file TargetRegistry.h.
using llvm::Target::MCRelocationInfoCtorTy = MCRelocationInfo *(*)(const Triple &TT, MCContext &Ctx) |
Definition at line 188 of file TargetRegistry.h.
using llvm::Target::MCSubtargetInfoCtorFnTy = MCSubtargetInfo *(*)(const Triple &TT, StringRef CPU, StringRef Features) |
Definition at line 133 of file TargetRegistry.h.
using llvm::Target::MCSymbolizerCtorTy = MCSymbolizer *(*)( const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr<MCRelocationInfo> &&RelInfo) |
Definition at line 192 of file TargetRegistry.h.
using llvm::Target::NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S) |
Definition at line 181 of file TargetRegistry.h.
using llvm::Target::ObjectTargetStreamerCtorTy = MCTargetStreamer *(*)( MCStreamer &S, const MCSubtargetInfo &STI) |
Definition at line 186 of file TargetRegistry.h.
using llvm::Target::TargetMachineCtorTy = TargetMachine *(*)(const Target &T, const Triple &TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM, CodeGenOpt::Level OL, bool JIT) |
Definition at line 137 of file TargetRegistry.h.
using llvm::Target::WasmStreamerCtorTy = MCStreamer *(*)(const Triple &T, MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB, std::unique_ptr<MCObjectWriter> &&OW, std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll) |
Definition at line 180 of file TargetRegistry.h.
|
default |
|
inline |
createAsmPrinter - Create a target specific assembly printer pass.
This takes ownership of the MCStreamer object.
Definition at line 425 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
Definition at line 514 of file TargetRegistry.h.
References llvm::createAsmStreamer(), and createAsmTargetStreamer().
Referenced by llvm::LLVMTargetMachine::addAsmPrinter().
|
inline |
Definition at line 529 of file TargetRegistry.h.
Referenced by createAsmStreamer().
|
inline |
createMCAsmBackend - Create a target specific assembly parser.
Definition at line 402 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple.
TheTriple | This argument is used to determine the target machine feature set; it should always be provided. Generally this should be either the target triple from the module, or the target triple of the host if that does not exist. |
Definition at line 334 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo(), and LLVMCreateDisasmCPUFeatures().
|
inline |
createMCAsmParser - Create a target specific assembly parser.
Parser | The target independent parser implementation to use for parsing and lexing. |
Definition at line 414 of file TargetRegistry.h.
Referenced by srcMgrDiagHandler().
|
inline |
createMCCodeEmitter - Create a target specific code emitter.
Definition at line 449 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), llvm::LLVMTargetMachine::addPassesToEmitMC(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 432 of file TargetRegistry.h.
Referenced by LLVMCreateDisasmCPUFeatures().
|
inline |
Definition at line 439 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), LLVMCreateDisasmCPUFeatures(), and LLVMSetDisasmOptions().
|
inline |
createMCInstrAnalysis - Create a MCInstrAnalysis implementation.
Definition at line 351 of file TargetRegistry.h.
|
inline |
createMCInstrInfo - Create a MCInstrInfo implementation.
Definition at line 343 of file TargetRegistry.h.
Referenced by createAMDGPUDisassembler(), createARCDisassembler(), createHexagonDisassembler(), createWebAssemblyDisassembler(), createX86Disassembler(), llvm::LLVMTargetMachine::initAsmInfo(), LLVMCreateDisasmCPUFeatures(), and srcMgrDiagHandler().
|
inline |
Create a target specific MCStreamer.
T | The target triple. |
Ctx | The target context. |
TAB | The target assembler backend object. Takes ownership. |
OW | The stream object. |
Emitter | The target independent assembler object.Takes ownership. |
RelaxAll | Relax all fixups? |
Definition at line 465 of file TargetRegistry.h.
References assert(), llvm::Triple::COFF, llvm::createELFStreamer(), llvm::createMachOStreamer(), llvm::createWasmStreamer(), llvm::Triple::ELF, llvm::Triple::getObjectFormat(), llvm::Triple::isOSWindows(), llvm_unreachable, llvm::Triple::MachO, and llvm::Triple::Wasm.
|
inline |
createMCRegInfo - Create a MCRegisterInfo implementation.
Definition at line 359 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo(), LLVMCreateDisasmCPUFeatures(), and llvm::DWARFContext::loadRegisterInfo().
|
inline |
createMCRelocationInfo - Create a target specific MCRelocationInfo.
TT | The target triple. |
Ctx | The target context. |
Definition at line 554 of file TargetRegistry.h.
References llvm::createMCRelocationInfo().
Referenced by LLVMCreateDisasmCPUFeatures().
|
inline |
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
TheTriple | This argument is used to determine the target machine feature set; it should always be provided. Generally this should be either the target triple from the module, or the target triple of the host if that does not exist. |
CPU | This specifies the name of the target CPU. |
Features | This specifies the string representation of the additional target features. |
Definition at line 374 of file TargetRegistry.h.
Referenced by llvm::AsmPrinter::doInitialization(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::LLVMTargetMachine::initAsmInfo(), and LLVMCreateDisasmCPUFeatures().
|
inline |
createMCSymbolizer - Create a target specific MCSymbolizer.
TT | The target triple. |
GetOpInfo | The function to get the symbolic information for operands. |
SymbolLookUp | The function to lookup a symbol name. |
DisInfo | The pointer to the block of symbolic information for above call back. |
Ctx | The target context. |
RelInfo | The relocation information for this target. Takes ownership. |
Definition at line 574 of file TargetRegistry.h.
References llvm::createMCSymbolizer().
Referenced by LLVMCreateDisasmCPUFeatures().
|
inline |
Definition at line 538 of file TargetRegistry.h.
References llvm::createNullStreamer(), and createNullTargetStreamer().
|
inline |
Definition at line 544 of file TargetRegistry.h.
Referenced by createNullStreamer().
|
inline |
createTargetMachine - Create a target specific machine implementation for the specified Triple
.
TT | This argument is used to determine the target machine feature set; it should always be provided. Generally this should be either the target triple from the module, or the target triple of the host if that does not exist. |
Definition at line 388 of file TargetRegistry.h.
References llvm::EngineKind::JIT.
Referenced by llvm::lto::Config::addSaveTemps(), llvm::LTOCodeGenerator::compile(), llvm::TargetMachineBuilder::create(), parseBitcodeFileImpl(), and llvm::EngineBuilder::selectTarget().
getBackendName - Get the backend name.
Definition at line 305 of file TargetRegistry.h.
getName - Get the target name.
Definition at line 299 of file TargetRegistry.h.
References Name.
Referenced by getFixupKindNumBytes(), LLVMGetTargetFromName(), llvm::TargetRegistry::lookupTarget(), llvm::WholeProgramDevirtPass::run(), and llvm::EngineBuilder::selectTarget().
Definition at line 296 of file TargetRegistry.h.
Referenced by llvm::TargetRegistry::iterator::operator++().
getShortDescription - Get a short description of the target.
Definition at line 302 of file TargetRegistry.h.
|
inline |
hasJIT - Check if this targets supports the just-in-time compilation.
Definition at line 312 of file TargetRegistry.h.
Referenced by llvm::EngineBuilder::create().
|
inline |
hasMCAsmBackend - Check if this target supports .o generation.
Definition at line 318 of file TargetRegistry.h.
|
inline |
hasMCAsmParser - Check if this target supports assembly parsing.
Definition at line 321 of file TargetRegistry.h.
|
inline |
hasTargetMachine - Check if this target supports code generation.
Definition at line 315 of file TargetRegistry.h.
|
friend |
Definition at line 122 of file TargetRegistry.h.