class Target

Declaration

class Target { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:124

Method Overview

  • public Target()
  • public llvm::AsmPrinter * createAsmPrinter(llvm::TargetMachine & TM, std::unique_ptr<MCStreamer> && Streamer) const
  • public llvm::MCStreamer * createAsmStreamer(llvm::MCContext & Ctx, std::unique_ptr<formatted_raw_ostream> OS, bool IsVerboseAsm, bool UseDwarfDirectory, llvm::MCInstPrinter * InstPrint, std::unique_ptr<MCCodeEmitter> && CE, std::unique_ptr<MCAsmBackend> && TAB, bool ShowInst) const
  • public llvm::MCTargetStreamer * createAsmTargetStreamer(llvm::MCStreamer & S, llvm::formatted_raw_ostream & OS, llvm::MCInstPrinter * InstPrint, bool IsVerboseAsm) const
  • public llvm::MCAsmBackend * createMCAsmBackend(const llvm::MCSubtargetInfo & STI, const llvm::MCRegisterInfo & MRI, const llvm::MCTargetOptions & Options) const
  • public llvm::MCAsmInfo * createMCAsmInfo(const llvm::MCRegisterInfo & MRI, llvm::StringRef TheTriple, const llvm::MCTargetOptions & Options) const
  • public llvm::MCTargetAsmParser * createMCAsmParser(const llvm::MCSubtargetInfo & STI, llvm::MCAsmParser & Parser, const llvm::MCInstrInfo & MII, const llvm::MCTargetOptions & Options) const
  • public llvm::MCCodeEmitter * createMCCodeEmitter(const llvm::MCInstrInfo & II, const llvm::MCRegisterInfo & MRI, llvm::MCContext & Ctx) const
  • public llvm::MCDisassembler * createMCDisassembler(const llvm::MCSubtargetInfo & STI, llvm::MCContext & Ctx) const
  • public llvm::MCInstPrinter * createMCInstPrinter(const llvm::Triple & T, unsigned int SyntaxVariant, const llvm::MCAsmInfo & MAI, const llvm::MCInstrInfo & MII, const llvm::MCRegisterInfo & MRI) const
  • public llvm::MCInstrAnalysis * createMCInstrAnalysis(const llvm::MCInstrInfo * Info) const
  • public llvm::MCInstrInfo * createMCInstrInfo() const
  • public llvm::MCStreamer * createMCObjectStreamer(const llvm::Triple & T, llvm::MCContext & Ctx, std::unique_ptr<MCAsmBackend> && TAB, std::unique_ptr<MCObjectWriter> && OW, std::unique_ptr<MCCodeEmitter> && Emitter, const llvm::MCSubtargetInfo & STI, bool RelaxAll, bool IncrementalLinkerCompatible, bool DWARFMustBeAtTheEnd) const
  • public llvm::MCRegisterInfo * createMCRegInfo(llvm::StringRef TT) const
  • public llvm::MCRelocationInfo * createMCRelocationInfo(llvm::StringRef TT, llvm::MCContext & Ctx) const
  • public llvm::MCSubtargetInfo * createMCSubtargetInfo(llvm::StringRef TheTriple, llvm::StringRef CPU, llvm::StringRef Features) const
  • public llvm::MCSymbolizer * createMCSymbolizer(llvm::StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void * DisInfo, llvm::MCContext * Ctx, std::unique_ptr<MCRelocationInfo> && RelInfo) const
  • public llvm::MCStreamer * createNullStreamer(llvm::MCContext & Ctx) const
  • public llvm::MCTargetStreamer * createNullTargetStreamer(llvm::MCStreamer & S) const
  • public llvm::TargetMachine * createTargetMachine(llvm::StringRef TT, llvm::StringRef CPU, llvm::StringRef Features, const llvm::TargetOptions & Options, Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM = None, CodeGenOpt::Level OL = CodeGenOpt::Default, bool JIT = false) const
  • public const char * getBackendName() const
  • public const char * getName() const
  • public const llvm::Target * getNext() const
  • public const char * getShortDescription() const
  • public bool hasJIT() const
  • public bool hasMCAsmBackend() const
  • public bool hasMCAsmParser() const
  • public bool hasTargetMachine() const

Methods

Target()

Declared at: llvm/include/llvm/Support/TargetRegistry.h:295

llvm::AsmPrinter* createAsmPrinter(
    llvm::TargetMachine& TM,
    std::unique_ptr<MCStreamer>&& Streamer) const

Description

createAsmPrinter - Create a target specific assembly printer pass. This takes ownership of the MCStreamer object.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:430

Parameters

llvm::TargetMachine& TM
std::unique_ptr<MCStreamer>&& Streamer

llvm::MCStreamer* createAsmStreamer(
    llvm::MCContext& Ctx,
    std::unique_ptr<formatted_raw_ostream> OS,
    bool IsVerboseAsm,
    bool UseDwarfDirectory,
    llvm::MCInstPrinter* InstPrint,
    std::unique_ptr<MCCodeEmitter>&& CE,
    std::unique_ptr<MCAsmBackend>&& TAB,
    bool ShowInst) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:523

Parameters

llvm::MCContext& Ctx
std::unique_ptr<formatted_raw_ostream> OS
bool IsVerboseAsm
bool UseDwarfDirectory
llvm::MCInstPrinter* InstPrint
std::unique_ptr<MCCodeEmitter>&& CE
std::unique_ptr<MCAsmBackend>&& TAB
bool ShowInst

llvm::MCTargetStreamer* createAsmTargetStreamer(
    llvm::MCStreamer& S,
    llvm::formatted_raw_ostream& OS,
    llvm::MCInstPrinter* InstPrint,
    bool IsVerboseAsm) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:538

Parameters

llvm::MCStreamer& S
llvm::formatted_raw_ostream& OS
llvm::MCInstPrinter* InstPrint
bool IsVerboseAsm

llvm::MCAsmBackend* createMCAsmBackend(
    const llvm::MCSubtargetInfo& STI,
    const llvm::MCRegisterInfo& MRI,
    const llvm::MCTargetOptions& Options) const

Description

createMCAsmBackend - Create a target specific assembly parser.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:407

Parameters

const llvm::MCSubtargetInfo& STI
const llvm::MCRegisterInfo& MRI
const llvm::MCTargetOptions& Options

llvm::MCAsmInfo* createMCAsmInfo(
    const llvm::MCRegisterInfo& MRI,
    llvm::StringRef TheTriple,
    const llvm::MCTargetOptions& Options) const

Description

createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:339

Parameters

const llvm::MCRegisterInfo& MRI
llvm::StringRef 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.
const llvm::MCTargetOptions& Options

llvm::MCTargetAsmParser* createMCAsmParser(
    const llvm::MCSubtargetInfo& STI,
    llvm::MCAsmParser& Parser,
    const llvm::MCInstrInfo& MII,
    const llvm::MCTargetOptions& Options) const

Description

createMCAsmParser - Create a target specific assembly parser.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:419

Parameters

const llvm::MCSubtargetInfo& STI
llvm::MCAsmParser& Parser
The target independent parser implementation to use for parsing and lexing.
const llvm::MCInstrInfo& MII
const llvm::MCTargetOptions& Options

llvm::MCCodeEmitter* createMCCodeEmitter(
    const llvm::MCInstrInfo& II,
    const llvm::MCRegisterInfo& MRI,
    llvm::MCContext& Ctx) const

Description

createMCCodeEmitter - Create a target specific code emitter.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:454

Parameters

const llvm::MCInstrInfo& II
const llvm::MCRegisterInfo& MRI
llvm::MCContext& Ctx

llvm::MCDisassembler* createMCDisassembler(
    const llvm::MCSubtargetInfo& STI,
    llvm::MCContext& Ctx) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:437

Parameters

const llvm::MCSubtargetInfo& STI
llvm::MCContext& Ctx

llvm::MCInstPrinter* createMCInstPrinter(
    const llvm::Triple& T,
    unsigned int SyntaxVariant,
    const llvm::MCAsmInfo& MAI,
    const llvm::MCInstrInfo& MII,
    const llvm::MCRegisterInfo& MRI) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:444

Parameters

const llvm::Triple& T
unsigned int SyntaxVariant
const llvm::MCAsmInfo& MAI
const llvm::MCInstrInfo& MII
const llvm::MCRegisterInfo& MRI

llvm::MCInstrAnalysis* createMCInstrAnalysis(
    const llvm::MCInstrInfo* Info) const

Description

createMCInstrAnalysis - Create a MCInstrAnalysis implementation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:356

Parameters

const llvm::MCInstrInfo* Info

llvm::MCInstrInfo* createMCInstrInfo() const

Description

createMCInstrInfo - Create a MCInstrInfo implementation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:348

llvm::MCStreamer* createMCObjectStreamer(
    const llvm::Triple& T,
    llvm::MCContext& Ctx,
    std::unique_ptr<MCAsmBackend>&& TAB,
    std::unique_ptr<MCObjectWriter>&& OW,
    std::unique_ptr<MCCodeEmitter>&& Emitter,
    const llvm::MCSubtargetInfo& STI,
    bool RelaxAll,
    bool IncrementalLinkerCompatible,
    bool DWARFMustBeAtTheEnd) const

Description

Create a target specific MCStreamer.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:470

Parameters

const llvm::Triple& T
The target triple.
llvm::MCContext& Ctx
The target context.
std::unique_ptr<MCAsmBackend>&& TAB
The target assembler backend object. Takes ownership.
std::unique_ptr<MCObjectWriter>&& OW
The stream object.
std::unique_ptr<MCCodeEmitter>&& Emitter
The target independent assembler object.Takes ownership.
const llvm::MCSubtargetInfo& STI
bool RelaxAll
Relax all fixups?
bool IncrementalLinkerCompatible
bool DWARFMustBeAtTheEnd

llvm::MCRegisterInfo* createMCRegInfo(
    llvm::StringRef TT) const

Description

createMCRegInfo - Create a MCRegisterInfo implementation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:364

Parameters

llvm::StringRef TT

llvm::MCRelocationInfo* createMCRelocationInfo(
    llvm::StringRef TT,
    llvm::MCContext& Ctx) const

Description

createMCRelocationInfo - Create a target specific MCRelocationInfo.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:563

Parameters

llvm::StringRef TT
The target triple.
llvm::MCContext& Ctx
The target context.

llvm::MCSubtargetInfo* createMCSubtargetInfo(
    llvm::StringRef TheTriple,
    llvm::StringRef CPU,
    llvm::StringRef Features) const

Description

createMCSubtargetInfo - Create a MCSubtargetInfo implementation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:379

Parameters

llvm::StringRef 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.
llvm::StringRef CPU
This specifies the name of the target CPU.
llvm::StringRef Features
This specifies the string representation of the additional target features.

llvm::MCSymbolizer* createMCSymbolizer(
    llvm::StringRef TT,
    LLVMOpInfoCallback GetOpInfo,
    LLVMSymbolLookupCallback SymbolLookUp,
    void* DisInfo,
    llvm::MCContext* Ctx,
    std::unique_ptr<MCRelocationInfo>&& RelInfo)
    const

Description

createMCSymbolizer - Create a target specific MCSymbolizer.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:583

Parameters

llvm::StringRef TT
The target triple.
LLVMOpInfoCallback GetOpInfo
The function to get the symbolic information for operands.
LLVMSymbolLookupCallback SymbolLookUp
The function to lookup a symbol name.
void* DisInfo
The pointer to the block of symbolic information for above call back.
llvm::MCContext* Ctx
The target context.
std::unique_ptr<MCRelocationInfo>&& RelInfo
The relocation information for this target. Takes ownership.

llvm::MCStreamer* createNullStreamer(
    llvm::MCContext& Ctx) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:547

Parameters

llvm::MCContext& Ctx

llvm::MCTargetStreamer* createNullTargetStreamer(
    llvm::MCStreamer& S) const

Declared at: llvm/include/llvm/Support/TargetRegistry.h:553

Parameters

llvm::MCStreamer& S

llvm::TargetMachine* createTargetMachine(
    llvm::StringRef TT,
    llvm::StringRef CPU,
    llvm::StringRef Features,
    const llvm::TargetOptions& Options,
    Optional<Reloc::Model> RM,
    Optional<CodeModel::Model> CM = None,
    CodeGenOpt::Level OL = CodeGenOpt::Default,
    bool JIT = false) const

Description

createTargetMachine - Create a target specific machine implementation for the specified \p Triple.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:393

Parameters

llvm::StringRef 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.
llvm::StringRef CPU
llvm::StringRef Features
const llvm::TargetOptions& Options
Optional<Reloc::Model> RM
Optional<CodeModel::Model> CM = None
CodeGenOpt::Level OL = CodeGenOpt::Default
bool JIT = false

const char* getBackendName() const

Description

getBackendName - Get the backend name.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:310

const char* getName() const

Description

getName - Get the target name.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:304

const llvm::Target* getNext() const

Description

@ {

Declared at: llvm/include/llvm/Support/TargetRegistry.h:301

const char* getShortDescription() const

Description

getShortDescription - Get a short description of the target.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:307

bool hasJIT() const

Description

hasJIT - Check if this targets supports the just-in-time compilation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:317

bool hasMCAsmBackend() const

Description

hasMCAsmBackend - Check if this target supports .o generation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:323

bool hasMCAsmParser() const

Description

hasMCAsmParser - Check if this target supports assembly parsing.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:326

bool hasTargetMachine() const

Description

hasTargetMachine - Check if this target supports code generation.

Declared at: llvm/include/llvm/Support/TargetRegistry.h:320