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

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

#include <TargetRegistry.h>

List of all members.

Public Types

typedef bool(* ArchMatchFnTy )(Triple::ArchType Arch)
typedef MCAsmInfo *(* MCAsmInfoCtorFnTy )(const MCRegisterInfo &MRI, const Triple &TT)
typedef MCCodeGenInfo *(* MCCodeGenInfoCtorFnTy )(const Triple &TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
typedef MCInstrInfo *(* MCInstrInfoCtorFnTy )(void)
typedef MCInstrAnalysis *(* MCInstrAnalysisCtorFnTy )(const MCInstrInfo *Info)
typedef MCRegisterInfo *(* MCRegInfoCtorFnTy )(const Triple &TT)
typedef MCSubtargetInfo *(* MCSubtargetInfoCtorFnTy )(const Triple &TT, StringRef CPU, StringRef Features)
typedef TargetMachine *(* TargetMachineCtorTy )(const Target &T, const Triple &TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
typedef AsmPrinter *(* AsmPrinterCtorTy )(TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer)
typedef MCAsmBackend *(* MCAsmBackendCtorTy )(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
typedef MCTargetAsmParser *(* MCAsmParserCtorTy )(const 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 Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
typedef MCCodeEmitter *(* MCCodeEmitterCtorTy )(const MCInstrInfo &II, const MCRegisterInfo &MRI, MCContext &Ctx)
typedef MCStreamer *(* ELFStreamerCtorTy )(const Triple &T, MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll)
typedef MCStreamer *(* MachOStreamerCtorTy )(MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool DWARFMustBeAtTheEnd)
typedef MCStreamer *(* COFFStreamerCtorTy )(MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool IncrementalLinkerCompatible)
typedef MCTargetStreamer *(* NullTargetStreamerCtorTy )(MCStreamer &S)
typedef MCTargetStreamer *(* AsmTargetStreamerCtorTy )(MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool IsVerboseAsm)
typedef MCTargetStreamer *(* ObjectTargetStreamerCtorTy )(MCStreamer &S, const MCSubtargetInfo &STI)
typedef MCRelocationInfo *(* MCRelocationInfoCtorTy )(const Triple &TT, MCContext &Ctx)
typedef MCSymbolizer *(* MCSymbolizerCtorTy )(const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< 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 TheTriple) const
 createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple.
MCCodeGenInfocreateMCCodeGenInfo (StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) const
 createMCCodeGenInfo - Create a MCCodeGenInfo implementation.
MCInstrInfocreateMCInstrInfo () const
 createMCInstrInfo - Create a MCInstrInfo implementation.
MCInstrAnalysiscreateMCInstrAnalysis (const MCInstrInfo *Info) const
 createMCInstrAnalysis - Create a MCInstrAnalysis implementation.
MCRegisterInfocreateMCRegInfo (StringRef TT) const
 createMCRegInfo - Create a MCRegisterInfo implementation.
MCSubtargetInfocreateMCSubtargetInfo (StringRef TheTriple, StringRef CPU, StringRef Features) const
 createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
TargetMachinecreateTargetMachine (StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM=Reloc::Default, CodeModel::Model CM=CodeModel::Default, CodeGenOpt::Level OL=CodeGenOpt::Default) const
 createTargetMachine - Create a target specific machine implementation for the specified Triple.
MCAsmBackendcreateMCAsmBackend (const MCRegisterInfo &MRI, StringRef TheTriple, StringRef CPU) const
 createMCAsmBackend - Create a target specific assembly parser.
MCTargetAsmParsercreateMCAsmParser (const MCSubtargetInfo &STI, MCAsmParser &Parser, const MCInstrInfo &MII, const MCTargetOptions &Options) const
 createMCAsmParser - Create a target specific assembly parser.
AsmPrintercreateAsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer) const
 createAsmPrinter - Create a target specific assembly printer pass.
MCDisassemblercreateMCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx) const
MCInstPrintercreateMCInstPrinter (const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) const
MCCodeEmittercreateMCCodeEmitter (const MCInstrInfo &II, const MCRegisterInfo &MRI, MCContext &Ctx) const
 createMCCodeEmitter - Create a target specific code emitter.
MCStreamercreateMCObjectStreamer (const Triple &T, MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter, const MCSubtargetInfo &STI, bool RelaxAll, bool IncrementalLinkerCompatible, bool DWARFMustBeAtTheEnd) const
 Create a target specific MCStreamer.
MCStreamercreateAsmStreamer (MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, bool IsVerboseAsm, bool UseDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) const
MCTargetStreamercreateAsmTargetStreamer (MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint, bool IsVerboseAsm) const
MCStreamercreateNullStreamer (MCContext &Ctx) const
MCTargetStreamercreateNullTargetStreamer (MCStreamer &S) const
MCRelocationInfocreateMCRelocationInfo (StringRef TT, MCContext &Ctx) const
 createMCRelocationInfo - Create a target specific MCRelocationInfo.
MCSymbolizercreateMCSymbolizer (StringRef TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo) const
 createMCSymbolizer - Create a target specific MCSymbolizer.
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 87 of file TargetRegistry.h.


Member Typedef Documentation

Definition at line 91 of file TargetRegistry.h.

typedef AsmPrinter*(* llvm::Target::AsmPrinterCtorTy)(TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer)

Definition at line 112 of file TargetRegistry.h.

Definition at line 147 of file TargetRegistry.h.

Definition at line 141 of file TargetRegistry.h.

Definition at line 131 of file TargetRegistry.h.

Definition at line 136 of file TargetRegistry.h.

Definition at line 114 of file TargetRegistry.h.

Definition at line 93 of file TargetRegistry.h.

Definition at line 117 of file TargetRegistry.h.

Definition at line 128 of file TargetRegistry.h.

Definition at line 95 of file TargetRegistry.h.

Definition at line 120 of file TargetRegistry.h.

Definition at line 123 of file TargetRegistry.h.

Definition at line 100 of file TargetRegistry.h.

Definition at line 99 of file TargetRegistry.h.

Definition at line 101 of file TargetRegistry.h.

Definition at line 152 of file TargetRegistry.h.

Definition at line 102 of file TargetRegistry.h.

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

Definition at line 154 of file TargetRegistry.h.

Definition at line 146 of file TargetRegistry.h.

Definition at line 150 of file TargetRegistry.h.

Definition at line 105 of file TargetRegistry.h.


Constructor & Destructor Documentation

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

Definition at line 254 of file TargetRegistry.h.


Member Function Documentation

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

createAsmPrinter - Create a target specific assembly printer pass.

This takes ownership of the MCStreamer object.

Definition at line 393 of file TargetRegistry.h.

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

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

Definition at line 468 of file TargetRegistry.h.

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

MCTargetStreamer* llvm::Target::createAsmTargetStreamer ( MCStreamer S,
formatted_raw_ostream OS,
MCInstPrinter InstPrint,
bool  IsVerboseAsm 
) const [inline]

Definition at line 481 of file TargetRegistry.h.

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

createMCAsmBackend - Create a target specific assembly parser.

Parameters:
TheTripleThe target triple string.

Definition at line 371 of file TargetRegistry.h.

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

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

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

Parameters:
TheTripleThis 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 292 of file TargetRegistry.h.

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

createMCAsmParser - Create a target specific assembly parser.

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

Definition at line 382 of file TargetRegistry.h.

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

createMCCodeEmitter - Create a target specific code emitter.

Definition at line 417 of file TargetRegistry.h.

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

createMCCodeGenInfo - Create a MCCodeGenInfo implementation.

Definition at line 301 of file TargetRegistry.h.

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

Definition at line 400 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPUFeatures().

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

createMCInstrAnalysis - Create a MCInstrAnalysis implementation.

Definition at line 319 of file TargetRegistry.h.

MCStreamer* llvm::Target::createMCObjectStreamer ( const Triple T,
MCContext Ctx,
MCAsmBackend TAB,
raw_pwrite_stream OS,
MCCodeEmitter Emitter,
const MCSubtargetInfo STI,
bool  RelaxAll,
bool  IncrementalLinkerCompatible,
bool  DWARFMustBeAtTheEnd 
) const [inline]

Create a target specific MCStreamer.

Parameters:
TThe 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?

Definition at line 433 of file TargetRegistry.h.

References llvm::Triple::COFF, llvm::createELFStreamer(), llvm::createMachOStreamer(), llvm::Triple::ELF, llvm::Triple::getObjectFormat(), llvm::Triple::isOSWindows(), llvm_unreachable, and llvm::Triple::MachO.

createMCRegInfo - Create a MCRegisterInfo implementation.

Definition at line 327 of file TargetRegistry.h.

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

createMCRelocationInfo - Create a target specific MCRelocationInfo.

Parameters:
TTThe target triple.
CtxThe target context.

Definition at line 506 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPUFeatures().

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

createMCSubtargetInfo - Create a MCSubtargetInfo implementation.

Parameters:
TheTripleThis 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 342 of file TargetRegistry.h.

Referenced by llvm::AsmPrinter::doInitialization(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), llvm::LLVMTargetMachine::initAsmInfo(), llvm::object::IRObjectFile::IRObjectFile(), and LLVMCreateDisasmCPUFeatures().

MCSymbolizer* llvm::Target::createMCSymbolizer ( StringRef  TT,
LLVMOpInfoCallback  GetOpInfo,
LLVMSymbolLookupCallback  SymbolLookUp,
void *  DisInfo,
MCContext Ctx,
std::unique_ptr< 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 526 of file TargetRegistry.h.

Referenced by LLVMCreateDisasmCPUFeatures().

Definition at line 490 of file TargetRegistry.h.

Definition at line 496 of file TargetRegistry.h.

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

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

Parameters:
TTThis 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 357 of file TargetRegistry.h.

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

Referenced by codegen(), and llvm::EngineBuilder::selectTarget().

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

getName - Get the target name.

Definition at line 267 of file TargetRegistry.h.

References Name.

Referenced by LLVMGetTargetFromName(), llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().

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

Definition at line 264 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 270 of file TargetRegistry.h.

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

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

Definition at line 275 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 281 of file TargetRegistry.h.

hasTargetMachine - Check if this target supports code generation.

Definition at line 278 of file TargetRegistry.h.


Friends And Related Function Documentation

friend struct TargetRegistry [friend]

Definition at line 89 of file TargetRegistry.h.


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