LLVM: llvm::Target Class Reference (original) (raw)

Target - Wrapper for Target specific information. More...

#include "[llvm/MC/TargetRegistry.h](TargetRegistry%5F8h%5Fsource.html)"

Public Types
using ArchMatchFnTy = bool(*)(Triple::ArchType Arch)
using MCAsmInfoCtorFnTy = MCAsmInfo *(*)(const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options)
using MCObjectFileInfoCtorFnTy = MCObjectFileInfo *(*)(MCContext &Ctx, bool PIC, bool LargeCodeModel)
using MCInstrInfoCtorFnTy = MCInstrInfo *(*)()
using MCInstrAnalysisCtorFnTy = MCInstrAnalysis *(*)(const MCInstrInfo *Info)
using MCRegInfoCtorFnTy = MCRegisterInfo *(*)(const Triple &TT)
using MCSubtargetInfoCtorFnTy = MCSubtargetInfo *(*)(const Triple &TT, StringRef CPU, StringRef Features)
using TargetMachineCtorTy = TargetMachine *(*)(const Target &T, const Triple &TT, StringRef CPU, StringRef Features, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
using AsmPrinterCtorTy = AsmPrinter *(*)(TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer)
using MCAsmBackendCtorTy = MCAsmBackend *(*)(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
using MCAsmParserCtorTy = MCTargetAsmParser *(*)(const MCSubtargetInfo &STI, MCAsmParser &P, const MCInstrInfo &MII, const MCTargetOptions &Options)
using MCDisassemblerCtorTy = MCDisassembler *(*)(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
using MCInstPrinterCtorTy = MCInstPrinter *(*)(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
using MCCodeEmitterCtorTy = MCCodeEmitter *(*)(const MCInstrInfo &II, MCContext &Ctx)
using ELFStreamerCtorTy = MCStreamer *(*)(const Triple &T, MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
using MachOStreamerCtorTy = MCStreamer *(*)(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
using COFFStreamerCtorTy = MCStreamer *(*)(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
using XCOFFStreamerCtorTy = MCStreamer *(*)(const Triple &T, MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
using NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S)
using AsmTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint)
using ObjectTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S, const MCSubtargetInfo &STI)
using MCRelocationInfoCtorTy = MCRelocationInfo *(*)(const Triple &TT, MCContext &Ctx)
using MCSymbolizerCtorTy = MCSymbolizer *(*)(const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo)
using CustomBehaviourCtorTy = mca::CustomBehaviour *(*)(const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII)
using InstrPostProcessCtorTy = mca::InstrPostProcess *(*)(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
using InstrumentManagerCtorTy = mca::InstrumentManager *(*)(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
Public Member Functions
Target ()=default
Target Information
const Target * getNext () const
const char * getName () const
getName - Get the target name.
const char * getShortDescription () const
getShortDescription - Get a short description of the target.
const char * getBackendName () const
getBackendName - Get the backend name.
Feature Predicates
bool hasJIT () const
hasJIT - Check if this targets supports the just-in-time compilation.
bool hasTargetMachine () const
hasTargetMachine - Check if this target supports code generation.
bool hasMCAsmBackend () const
hasMCAsmBackend - Check if this target supports .o generation.
bool hasMCAsmParser () const
hasMCAsmParser - Check if this target supports assembly parsing.
Feature Constructors
MCAsmInfo * createMCAsmInfo (const MCRegisterInfo &MRI, StringRef TheTriple, const MCTargetOptions &Options) const
createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple.
MCObjectFileInfo * createMCObjectFileInfo (MCContext &Ctx, bool PIC, bool LargeCodeModel=false) const
Create a MCObjectFileInfo implementation for the specified target triple.
MCInstrInfo * createMCInstrInfo () const
createMCInstrInfo - Create a MCInstrInfo implementation.
MCInstrAnalysis * createMCInstrAnalysis (const MCInstrInfo *Info) const
createMCInstrAnalysis - Create a MCInstrAnalysis implementation.
MCRegisterInfo * createMCRegInfo (StringRef TT) const
createMCRegInfo - Create a MCRegisterInfo implementation.
MCSubtargetInfo * createMCSubtargetInfo (StringRef TheTriple, StringRef CPU, StringRef Features) const
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
TargetMachine * createTargetMachine (StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM=std::nullopt, CodeGenOptLevel OL=CodeGenOptLevel::Default, bool JIT=false) const
createTargetMachine - Create a target specific machine implementation for the specified Triple.
MCAsmBackend * createMCAsmBackend (const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) const
createMCAsmBackend - Create a target specific assembly parser.
MCTargetAsmParser * createMCAsmParser (const MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) const
createMCAsmParser - Create a target specific assembly parser.
AsmPrinter * createAsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer) const
createAsmPrinter - Create a target specific assembly printer pass.
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, MCContext &Ctx) const
createMCCodeEmitter - Create a target specific code emitter.
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) const
Create a target specific MCStreamer.
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, bool, bool) const
MCStreamer * createAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, MCInstPrinter *IP, std::unique_ptr< MCCodeEmitter > CE, std::unique_ptr< MCAsmBackend > TAB) const
MCStreamer * createAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, bool IsVerboseAsm, bool UseDwarfDirectory, MCInstPrinter *IP, std::unique_ptr< MCCodeEmitter > &&CE, std::unique_ptr< MCAsmBackend > &&TAB, bool ShowInst) const
MCTargetStreamer * createAsmTargetStreamer (MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint) const
MCStreamer * createNullStreamer (MCContext &Ctx) const
MCTargetStreamer * createNullTargetStreamer (MCStreamer &S) const
MCRelocationInfo * createMCRelocationInfo (StringRef TT, MCContext &Ctx) const
createMCRelocationInfo - Create a target specific MCRelocationInfo.
MCSymbolizer * createMCSymbolizer (StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo) const
createMCSymbolizer - Create a target specific MCSymbolizer.
mca::CustomBehaviour * createCustomBehaviour (const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII) const
createCustomBehaviour - Create a target specific CustomBehaviour.
mca::InstrPostProcess * createInstrPostProcess (const MCSubtargetInfo &STI, const MCInstrInfo &MCII) const
createInstrPostProcess - Create a target specific InstrPostProcess.
mca::InstrumentManager * createInstrumentManager (const MCSubtargetInfo &STI, const MCInstrInfo &MCII) const
createInstrumentManager - Create a target specific InstrumentManager.

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 144 of file TargetRegistry.h.

ArchMatchFnTy

AsmPrinterCtorTy

AsmTargetStreamerCtorTy

COFFStreamerCtorTy

CustomBehaviourCtorTy

ELFStreamerCtorTy

InstrPostProcessCtorTy

InstrumentManagerCtorTy

MachOStreamerCtorTy

MCAsmBackendCtorTy

MCAsmInfoCtorFnTy

MCAsmParserCtorTy

MCCodeEmitterCtorTy

MCDisassemblerCtorTy

MCInstPrinterCtorTy

MCInstrAnalysisCtorFnTy

MCInstrInfoCtorFnTy

MCObjectFileInfoCtorFnTy

MCRegInfoCtorFnTy

MCRelocationInfoCtorTy

MCSubtargetInfoCtorFnTy

MCSymbolizerCtorTy

NullTargetStreamerCtorTy

ObjectTargetStreamerCtorTy

TargetMachineCtorTy

XCOFFStreamerCtorTy

llvm::Target::Target ( ) default

createAsmPrinter()

createAsmStreamer() [1/2]

createAsmStreamer() [2/2]

createAsmTargetStreamer()

createCustomBehaviour()

createCustomBehaviour - Create a target specific CustomBehaviour.

This class is used by llvm-mca and requires backend functionality.

Definition at line 609 of file TargetRegistry.h.

References llvm::SrcMgr.

createInstrPostProcess()

createInstrPostProcess - Create a target specific InstrPostProcess.

This class is used by llvm-mca and requires backend functionality.

Definition at line 619 of file TargetRegistry.h.

createInstrumentManager()

createInstrumentManager - Create a target specific InstrumentManager.

This class is used by llvm-mca and requires backend functionality.

Definition at line 630 of file TargetRegistry.h.

createMCAsmBackend()

createMCAsmInfo()

createMCAsmParser()

createMCAsmParser - Create a target specific assembly parser.

Parameters

Parser The target independent parser implementation to use for parsing and lexing.

Definition at line 479 of file TargetRegistry.h.

References Options.

createMCCodeEmitter()

createMCDisassembler()

createMCInstPrinter()

createMCInstrAnalysis()

createMCInstrInfo()

MCInstrInfo * llvm::Target::createMCInstrInfo ( ) const inline

createMCObjectFileInfo()

createMCObjectStreamer() [1/2]

createMCObjectStreamer() [2/2]

Create a target specific MCStreamer.

Parameters

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.

Definition at line 25 of file TargetRegistry.cpp.

References assert(), llvm::Triple::COFF, llvm::createDXContainerStreamer(), llvm::createELFStreamer(), llvm::createGOFFStreamer(), llvm::createMachOStreamer(), llvm::createSPIRVStreamer(), llvm::createWasmStreamer(), llvm::Triple::DXContainer, llvm::Triple::ELF, Emitter, llvm::Triple::GOFF, llvm_unreachable, llvm::Triple::MachO, llvm::Triple::SPIRV, llvm::Triple::UnknownObjectFormat, llvm::Triple::Wasm, and llvm::Triple::XCOFF.

Referenced by createMCObjectStreamer(), llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().

createMCRegInfo()

createMCRelocationInfo()

createMCSubtargetInfo()

createMCSymbolizer()

createMCSymbolizer - Create a target specific MCSymbolizer.

Parameters

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 597 of file TargetRegistry.h.

References llvm::createMCSymbolizer().

Referenced by LLVMCreateDisasmCPUFeatures().

createNullStreamer()

createNullTargetStreamer()

createTargetMachine()

getBackendName()

const char * llvm::Target::getBackendName ( ) const inline

getName()

const char * llvm::Target::getName ( ) const inline

getName - Get the target name.

Definition at line 353 of file TargetRegistry.h.

References Name.

Referenced by llvm::jitlink::TableManager< TableManagerImplT >::getEntryForTarget(), llvm::jitlink::PerGraphGOTAndPLTStubsBuilder< BuilderImplT >::getGOTEntry(), llvm::jitlink::PerGraphGOTAndPLTStubsBuilder< BuilderImplT >::getPLTStub(), llvm::MachObjectWriter::getSymbolAddress(), LLVMGetTargetName(), llvm::logicalview::LVScope::markMissingParents(), llvm::logicalview::LVSymbol::markMissingParents(), llvm::logicalview::LVType::markMissingParents(), llvm::jitlink::TableManager< TableManagerImplT >::registerPreExistingEntry(), llvm::jitlink::aarch32::StubsManager_prev7::visitEdge(), and llvm::jitlink::aarch32::StubsManager_v7::visitEdge().

getNext()

getShortDescription()

const char * llvm::Target::getShortDescription ( ) const inline

hasJIT()

bool llvm::Target::hasJIT ( ) const inline

hasMCAsmBackend()

bool llvm::Target::hasMCAsmBackend ( ) const inline

hasMCAsmParser()

bool llvm::Target::hasMCAsmParser ( ) const inline

hasTargetMachine()

bool llvm::Target::hasTargetMachine ( ) const inline

TargetRegistry


The documentation for this class was generated from the following files: