LLVM API Documentation

Public Types | Public Member Functions | Friends
llvm::Target Class Reference

#include <TargetRegistry.h>

List of all members.

Public Types

typedef bool(* ArchMatchFnTy )(Triple::ArchType Arch)
typedef MCAsmInfo *(* MCAsmInfoCtorFnTy )(const MCRegisterInfo &MRI, StringRef TT)
typedef MCCodeGenInfo *(* MCCodeGenInfoCtorFnTy )(StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
typedef MCInstrInfo *(* MCInstrInfoCtorFnTy )(void)
typedef MCInstrAnalysis *(* MCInstrAnalysisCtorFnTy )(const MCInstrInfo *Info)
typedef MCRegisterInfo *(* MCRegInfoCtorFnTy )(StringRef TT)
typedef MCSubtargetInfo *(* MCSubtargetInfoCtorFnTy )(StringRef TT, StringRef CPU, StringRef Features)
typedef TargetMachine *(* TargetMachineCtorTy )(const Target &T, StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
typedef AsmPrinter *(* AsmPrinterCtorTy )(TargetMachine &TM, MCStreamer &Streamer)
typedef MCAsmBackend *(* MCAsmBackendCtorTy )(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU)
typedef MCTargetAsmParser *(* MCAsmParserCtorTy )(MCSubtargetInfo &STI, MCAsmParser &P, const MCInstrInfo &MII, const MCTargetOptions &Options)
typedef MCDisassembler *(* MCDisassemblerCtorTy )(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
typedef MCInstPrinter *(* MCInstPrinterCtorTy )(const Target &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI)
typedef MCCodeEmitter *(* MCCodeEmitterCtorTy )(const MCInstrInfo &II, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx)
typedef MCStreamer *(* MCObjectStreamerCtorTy )(const Target &T, StringRef TT, MCContext &Ctx, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, const MCSubtargetInfo &STI, bool RelaxAll, bool NoExecStack)
typedef MCStreamer *(* AsmStreamerCtorTy )(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst)
typedef MCStreamer *(* NullStreamerCtorTy )(MCContext &Ctx)
typedef MCRelocationInfo *(* MCRelocationInfoCtorTy )(StringRef TT, MCContext &Ctx)
typedef MCSymbolizer *(* MCSymbolizerCtorTy )(StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, MCRelocationInfo *RelInfo)

Public Member Functions

 Target ()
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.
MCAsmInfocreateMCAsmInfo (const MCRegisterInfo &MRI, StringRef Triple) const
MCCodeGenInfocreateMCCodeGenInfo (StringRef Triple, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) const
MCInstrInfocreateMCInstrInfo () const
MCInstrAnalysiscreateMCInstrAnalysis (const MCInstrInfo *Info) const
MCRegisterInfocreateMCRegInfo (StringRef Triple) const
MCSubtargetInfocreateMCSubtargetInfo (StringRef Triple, StringRef CPU, StringRef Features) const
TargetMachinecreateTargetMachine (StringRef Triple, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default) const
MCAsmBackendcreateMCAsmBackend (const MCRegisterInfo &MRI, StringRef Triple, StringRef CPU) const
MCTargetAsmParsercreateMCAsmParser (MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) const
AsmPrintercreateAsmPrinter (TargetMachine &TM, MCStreamer &Streamer) const
MCDisassemblercreateMCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx) const
MCInstPrintercreateMCInstPrinter (unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI) const
MCCodeEmittercreateMCCodeEmitter (const MCInstrInfo &II, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx) const
 createMCCodeEmitter - Create a target specific code emitter.
MCStreamercreateMCObjectStreamer (StringRef TT, MCContext &Ctx, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, const MCSubtargetInfo &STI, bool RelaxAll, bool NoExecStack) const
MCStreamercreateAsmStreamer (MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) const
 createAsmStreamer - Create a target specific MCStreamer.
MCStreamercreateNullStreamer (MCContext &Ctx) const
MCRelocationInfocreateMCRelocationInfo (StringRef TT, MCContext &Ctx) const
MCSymbolizercreateMCSymbolizer (StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, MCRelocationInfo *RelInfo) const
Target Information
const TargetgetNext () const
const char * getName () const
 getName - Get the target name.
const char * getShortDescription () const
 getShortDescription - Get a short description of the target.

Friends

struct TargetRegistry

Detailed 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.

Definition at line 76 of file TargetRegistry.h.


Member Typedef Documentation

Definition at line 80 of file TargetRegistry.h.

Definition at line 102 of file TargetRegistry.h.

typedef MCStreamer*(* llvm::Target::AsmStreamerCtorTy)(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst)

Definition at line 135 of file TargetRegistry.h.

Definition at line 104 of file TargetRegistry.h.

Definition at line 82 of file TargetRegistry.h.

Definition at line 108 of file TargetRegistry.h.

Definition at line 122 of file TargetRegistry.h.

Definition at line 84 of file TargetRegistry.h.

Definition at line 113 of file TargetRegistry.h.

Definition at line 116 of file TargetRegistry.h.

Definition at line 89 of file TargetRegistry.h.

Definition at line 88 of file TargetRegistry.h.

Definition at line 126 of file TargetRegistry.h.

Definition at line 90 of file TargetRegistry.h.

Definition at line 144 of file TargetRegistry.h.

Definition at line 91 of file TargetRegistry.h.

typedef MCSymbolizer*(* llvm::Target::MCSymbolizerCtorTy)(StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, MCRelocationInfo *RelInfo)

Definition at line 146 of file TargetRegistry.h.

Definition at line 143 of file TargetRegistry.h.

Definition at line 94 of file TargetRegistry.h.


Constructor & Destructor Documentation

llvm::Target::Target ( ) [inline]

Definition at line 243 of file TargetRegistry.h.


Member Function Documentation

AsmPrinter* llvm::Target::createAsmPrinter ( TargetMachine TM,
MCStreamer Streamer 
) const [inline]

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

Definition at line 380 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

MCStreamer* llvm::Target::createAsmStreamer ( MCContext Ctx,
formatted_raw_ostream OS,
bool  isVerboseAsm,
bool  useDwarfDirectory,
MCInstPrinter InstPrint,
MCCodeEmitter CE,
MCAsmBackend TAB,
bool  ShowInst 
) const [inline]

createAsmStreamer - Create a target specific MCStreamer.

Definition at line 437 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile().

MCAsmBackend* llvm::Target::createMCAsmBackend ( const MCRegisterInfo MRI,
StringRef  Triple,
StringRef  CPU 
) const [inline]

createMCAsmBackend - Create a target specific assembly parser.

Parameters:
TripleThe target triple string.

Definition at line 357 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

MCAsmInfo* llvm::Target::createMCAsmInfo ( const MCRegisterInfo MRI,
StringRef  Triple 
) const [inline]

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

Parameters:
TripleThis 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 279 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::initAsmInfo(), llvm::object::IRObjectFile::IRObjectFile(), and LLVMCreateDisasmCPU().

createMCAsmParser - Create a target specific assembly parser.

Parameters:
ParserThe target independent parser implementation to use for parsing and lexing.

Definition at line 368 of file TargetRegistry.h.

Referenced by llvm::object::IRObjectFile::IRObjectFile().

createMCCodeEmitter - Create a target specific code emitter.

Definition at line 405 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().

createMCCodeGenInfo - Create a MCCodeGenInfo implementation.

Definition at line 288 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::LLVMTargetMachine().

Definition at line 386 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPU().

MCInstPrinter* llvm::Target::createMCInstPrinter ( unsigned  SyntaxVariant,
const MCAsmInfo MAI,
const MCInstrInfo MII,
const MCRegisterInfo MRI,
const MCSubtargetInfo STI 
) const [inline]

createMCInstrAnalysis - Create a MCInstrAnalysis implementation.

Definition at line 306 of file TargetRegistry.h.

createMCInstrInfo - Create a MCInstrInfo implementation.

Definition at line 298 of file TargetRegistry.h.

Referenced by createX86Disassembler(), llvm::object::IRObjectFile::IRObjectFile(), and LLVMCreateDisasmCPU().

MCStreamer* llvm::Target::createMCObjectStreamer ( StringRef  TT,
MCContext Ctx,
MCAsmBackend TAB,
raw_ostream _OS,
MCCodeEmitter _Emitter,
const MCSubtargetInfo STI,
bool  RelaxAll,
bool  NoExecStack 
) const [inline]

createMCObjectStreamer - Create a target specific MCStreamer.

Parameters:
TTThe target triple.
CtxThe target context.
TABThe target assembler backend object. Takes ownership.
_OSThe stream object.
_EmitterThe target independent assembler object.Takes ownership.
RelaxAllRelax all fixups?
NoExecStackMark file as not needing a executable stack.

Definition at line 423 of file TargetRegistry.h.

createMCRegInfo - Create a MCRegisterInfo implementation.

Definition at line 314 of file TargetRegistry.h.

Referenced by llvm::object::IRObjectFile::IRObjectFile(), and LLVMCreateDisasmCPU().

createMCRelocationInfo - Create a target specific MCRelocationInfo.

Parameters:
TTThe target triple.
CtxThe target context.

Definition at line 463 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPU().

MCSubtargetInfo* llvm::Target::createMCSubtargetInfo ( StringRef  Triple,
StringRef  CPU,
StringRef  Features 
) const [inline]

createMCSubtargetInfo - Create a MCSubtargetInfo implementation.

Parameters:
TripleThis 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.
CPUThis specifies the name of the target CPU.
FeaturesThis specifies the string representation of the additional target features.

Definition at line 329 of file TargetRegistry.h.

Referenced by llvm::object::IRObjectFile::IRObjectFile(), and LLVMCreateDisasmCPU().

MCSymbolizer* llvm::Target::createMCSymbolizer ( StringRef  TT,
LLVMOpInfoCallback  GetOpInfo,
LLVMSymbolLookupCallback  SymbolLookUp,
void *  DisInfo,
MCContext Ctx,
MCRelocationInfo RelInfo 
) const [inline]

createMCSymbolizer - Create a target specific MCSymbolizer.

Parameters:
TTThe target triple.
GetOpInfoThe function to get the symbolic information for operands.
SymbolLookUpThe function to lookup a symbol name.
DisInfoThe pointer to the block of symbolic information for above call back.
CtxThe target context.
RelInfoThe relocation information for this target. Takes ownership.

Definition at line 480 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPU().

Definition at line 452 of file TargetRegistry.h.

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

Parameters:
TripleThis 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 343 of file TargetRegistry.h.

References llvm::NVPTX::PTXCvtMode::RM.

Referenced by llvm::EngineBuilder::selectTarget().

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

getName - Get the target name.

Definition at line 254 of file TargetRegistry.h.

References Name.

const Target* llvm::Target::getNext ( ) const [inline]

Definition at line 251 of file TargetRegistry.h.

Referenced by llvm::TargetRegistry::iterator::operator++().

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

getShortDescription - Get a short description of the target.

Definition at line 257 of file TargetRegistry.h.

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

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

Definition at line 262 of file TargetRegistry.h.

Referenced by llvm::EngineBuilder::create().

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

hasMCAsmBackend - Check if this target supports .o generation.

Definition at line 268 of file TargetRegistry.h.

hasTargetMachine - Check if this target supports code generation.

Definition at line 265 of file TargetRegistry.h.


Friends And Related Function Documentation

friend struct TargetRegistry [friend]

Definition at line 78 of file TargetRegistry.h.


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