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
using MCObjectFileInfoCtorFnTy
using MCInstrInfoCtorFnTy = MCInstrInfo *(*)()
using MCInstrAnalysisCtorFnTy = MCInstrAnalysis *(*)(const MCInstrInfo *Info)
using MCRegInfoCtorFnTy = MCRegisterInfo *(*)(const Triple &TT)
using MCSubtargetInfoCtorFnTy
using TargetMachineCtorTy
using AsmPrinterCtorTy
using MCAsmBackendCtorTy
using MCAsmParserCtorTy
using MCDisassemblerCtorTy
using MCInstPrinterCtorTy
using MCCodeEmitterCtorTy
using ELFStreamerCtorTy
using MachOStreamerCtorTy
using COFFStreamerCtorTy
using XCOFFStreamerCtorTy
using NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S)
using AsmTargetStreamerCtorTy
using AsmStreamerCtorTy
using ObjectTargetStreamerCtorTy
using MCRelocationInfoCtorTy
using MCSymbolizerCtorTy
using CustomBehaviourCtorTy
using InstrPostProcessCtorTy
using InstrumentManagerCtorTy
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
MCAsmInfo * createMCAsmInfo (const MCRegisterInfo &MRI, const Triple &TheTriple, const MCTargetOptions &Options) const
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
MCRegisterInfo * createMCRegInfo (const Triple &TT) const
Create a MCRegisterInfo implementation.
MCSubtargetInfo * createMCSubtargetInfo (StringRef TheTriple, StringRef CPU, StringRef Features) const
MCSubtargetInfo * createMCSubtargetInfo (const Triple &TheTriple, StringRef CPU, StringRef Features) const
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
TargetMachine * createTargetMachine (const Triple &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.
LLVM_ABI 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.
LLVM_ABI MCStreamer * createAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, std::unique_ptr< MCInstPrinter > IP, std::unique_ptr< MCCodeEmitter > CE, std::unique_ptr< MCAsmBackend > TAB) 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
MCRelocationInfo * createMCRelocationInfo (const Triple &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
MCSymbolizer * createMCSymbolizer (const Triple &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.
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 146 of file TargetRegistry.h.

ArchMatchFnTy

AsmPrinterCtorTy

Initial value:

TargetMachine &TM, std::unique_ptr &&Streamer)

This class is intended to be used as a driving class for all asm writers.

Primary interface to the complete machine description for the target machine.

Definition at line 171 of file TargetRegistry.h.

AsmStreamerCtorTy

Initial value:

*(*)(MCContext & Ctx, std::unique_ptr<formatted_raw_ostream> OS,

std::unique_ptr IP, std::unique_ptr CE,

std::unique_ptr TAB)

Context object for machine code objects.

Streaming machine code generation interface.

Definition at line 213 of file TargetRegistry.h.

AsmTargetStreamerCtorTy

Initial value:

This is an instance of a target assembly language printer that converts an MCInst to valid target ass...

Target specific streamer interface.

formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...

Definition at line 210 of file TargetRegistry.h.

COFFStreamerCtorTy

Initial value:

std::unique_ptr &&OW,

std::unique_ptr &&Emitter)

dxil DXContainer Global Emitter

Definition at line 199 of file TargetRegistry.h.

CustomBehaviourCtorTy

Initial value:

Interface to description of machine instruction set.

Generic base class for all target subtargets.

Class which can be overriden by targets to enforce instruction dependencies and behaviours that aren'...

Abstracting the input code sequence (a sequence of MCInst) and assigning unique identifiers to every ...

Definition at line 227 of file TargetRegistry.h.

ELFStreamerCtorTy

Initial value:

std::unique_ptr &&TAB,

std::unique_ptr &&OW,

std::unique_ptr &&Emitter)

Triple - Helper class for working with autoconf configuration names.

Definition at line 190 of file TargetRegistry.h.

InstrPostProcessCtorTy

Initial value:

Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline st...

Definition at line 232 of file TargetRegistry.h.

InstrumentManagerCtorTy

Initial value:

This class allows targets to optionally customize the logic that resolves scheduling class IDs.

Definition at line 236 of file TargetRegistry.h.

MachOStreamerCtorTy

Initial value:

std::unique_ptr &&OW,

std::unique_ptr &&Emitter)

Definition at line 195 of file TargetRegistry.h.

MCAsmBackendCtorTy

Initial value:

unsigned const MachineRegisterInfo * MRI

Generic interface to target specific assembler backends.

MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...

Definition at line 173 of file TargetRegistry.h.

MCAsmInfoCtorFnTy

Initial value:

This class is intended to be used as a base class for asm properties and features specific to the tar...

Definition at line 152 of file TargetRegistry.h.

MCAsmParserCtorTy

Initial value:

Generic assembler parser interface, for use by target specific assembly parsers.

MCTargetAsmParser - Generic interface to target specific assembly parsers.

Definition at line 177 of file TargetRegistry.h.

MCCodeEmitterCtorTy

Initial value:

uint64_t IntrinsicInst * II

MCCodeEmitter - Generic instruction encoding interface.

Definition at line 188 of file TargetRegistry.h.

MCDisassemblerCtorTy

Initial value:

Superclass for all disassemblers.

Definition at line 180 of file TargetRegistry.h.

MCInstPrinterCtorTy

MCInstrAnalysisCtorFnTy

MCInstrInfoCtorFnTy

MCObjectFileInfoCtorFnTy

Initial value:

bool LargeCodeModel)

PassInstrumentationCallbacks PIC

Definition at line 155 of file TargetRegistry.h.

MCRegInfoCtorFnTy

MCRelocationInfoCtorTy

Initial value:

Create MCExprs from relocations found in an object file.

Definition at line 219 of file TargetRegistry.h.

MCSubtargetInfoCtorFnTy

Initial value:

StringRef - Represent a constant reference to a string, i.e.

Definition at line 161 of file TargetRegistry.h.

MCSymbolizerCtorTy

Initial value:

std::unique_ptr &&RelInfo)

Symbolize and annotate disassembled instructions.

const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)

The type for the symbol lookup function.

int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t OpSize, uint64_t InstSize, int TagType, void *TagBuf)

The type for the operand information call back function.

Definition at line 221 of file TargetRegistry.h.

NullTargetStreamerCtorTy

ObjectTargetStreamerCtorTy

TargetMachineCtorTy

Initial value:

std::optionalCodeModel::Model CM, CodeGenOptLevel OL, bool JIT)

CodeGenOptLevel

Code generation optimization level.

Definition at line 164 of file TargetRegistry.h.

XCOFFStreamerCtorTy

Initial value:

std::unique_ptr &&TAB,

std::unique_ptr &&OW,

std::unique_ptr &&Emitter)

Definition at line 203 of file TargetRegistry.h.

llvm::Target::Target ( ) default

createAsmPrinter()

createAsmStreamer()

createAsmTargetStreamer()

createCustomBehaviour()

createCustomBehaviour - Create a target specific CustomBehaviour.

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

Definition at line 648 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 658 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 669 of file TargetRegistry.h.

createMCAsmBackend()

createMCAsmInfo() [1/2]

Create a MCAsmInfo implementation for the specified target triple.

Parameters

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

References MRI, and Options.

createMCAsmInfo() [2/2]

createMCAsmParser()

createMCAsmParser - Create a target specific assembly parser.

Parameters

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

Definition at line 515 of file TargetRegistry.h.

References Options.

createMCCodeEmitter()

createMCDisassembler()

createMCInstPrinter()

createMCInstrAnalysis()

createMCInstrInfo()

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

createMCObjectFileInfo()

createMCObjectStreamer()

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 26 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, T, llvm::Triple::UnknownObjectFormat, llvm::Triple::Wasm, and llvm::Triple::XCOFF.

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

createMCRegInfo() [1/2]

createMCRegInfo() [2/2]

createMCRelocationInfo() [1/2]

createMCRelocationInfo() [2/2]

createMCSubtargetInfo() [1/2]

createMCSubtargetInfo - Create a MCSubtargetInfo implementation.

Parameters

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

createMCSubtargetInfo() [2/2]

createMCSymbolizer() [1/2]

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

References llvm::createMCSymbolizer().

createMCSymbolizer() [2/2]

createNullStreamer()

createNullTargetStreamer()

createTargetMachine()

getBackendName()

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

getName()

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

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: