LLVM API Documentation
#include <TargetRegistry.h>
Public Types | |
| typedef unsigned(* | TripleMatchQualityFnTy )(const std::string &TT) |
| 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, StringRef TT, StringRef CPU) |
| typedef MCTargetAsmParser *(* | MCAsmParserCtorTy )(MCSubtargetInfo &STI, MCAsmParser &P) |
| typedef MCDisassembler *(* | MCDisassemblerCtorTy )(const Target &T, const MCSubtargetInfo &STI) |
| 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, bool RelaxAll, bool NoExecStack) |
| typedef MCStreamer *(* | AsmStreamerCtorTy )(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) |
Public Member Functions | |
| Target () | |
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. | |
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 |
| hasAsmParser - Check if this target supports .s parsing. | |
| bool | hasAsmPrinter () const |
| hasAsmPrinter - Check if this target supports .s printing. | |
| bool | hasMCDisassembler () const |
| hasMCDisassembler - Check if this target has a disassembler. | |
| bool | hasMCInstPrinter () const |
| hasMCInstPrinter - Check if this target has an instruction printer. | |
| bool | hasMCCodeEmitter () const |
| hasMCCodeEmitter - Check if this target supports instruction encoding. | |
| bool | hasMCObjectStreamer () const |
| hasMCObjectStreamer - Check if this target supports streaming to files. | |
| bool | hasAsmStreamer () const |
| hasAsmStreamer - Check if this target supports streaming to files. | |
Feature Constructors | |
| MCAsmInfo * | createMCAsmInfo (const MCRegisterInfo &MRI, StringRef Triple) const |
| MCCodeGenInfo * | createMCCodeGenInfo (StringRef Triple, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) const |
| MCInstrInfo * | createMCInstrInfo () const |
| MCInstrAnalysis * | createMCInstrAnalysis (const MCInstrInfo *Info) const |
| MCRegisterInfo * | createMCRegInfo (StringRef Triple) const |
| MCSubtargetInfo * | createMCSubtargetInfo (StringRef Triple, StringRef CPU, StringRef Features) const |
| TargetMachine * | createTargetMachine (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 |
| MCAsmBackend * | createMCAsmBackend (StringRef Triple, StringRef CPU) const |
| MCTargetAsmParser * | createMCAsmParser (MCSubtargetInfo &STI, MCAsmParser &Parser) const |
| AsmPrinter * | createAsmPrinter (TargetMachine &TM, MCStreamer &Streamer) const |
| MCDisassembler * | createMCDisassembler (const MCSubtargetInfo &STI) const |
| MCInstPrinter * | createMCInstPrinter (unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI) const |
| MCCodeEmitter * | createMCCodeEmitter (const MCInstrInfo &II, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx) const |
| createMCCodeEmitter - Create a target specific code emitter. | |
| MCStreamer * | createMCObjectStreamer (StringRef TT, MCContext &Ctx, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) const |
| MCStreamer * | createAsmStreamer (MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) const |
| createAsmStreamer - Create a target specific MCStreamer. | |
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 67 of file TargetRegistry.h.
| typedef AsmPrinter*(* llvm::Target::AsmPrinterCtorTy)(TargetMachine &TM, MCStreamer &Streamer) |
Definition at line 93 of file TargetRegistry.h.
| typedef MCStreamer*(* llvm::Target::AsmStreamerCtorTy)(MCContext &Ctx, formatted_raw_ostream &OS, bool isVerboseAsm, bool useLoc, bool useCFI, bool useDwarfDirectory, MCInstPrinter *InstPrint, MCCodeEmitter *CE, MCAsmBackend *TAB, bool ShowInst) |
Definition at line 120 of file TargetRegistry.h.
| typedef MCAsmBackend*(* llvm::Target::MCAsmBackendCtorTy)(const Target &T, StringRef TT, StringRef CPU) |
Definition at line 95 of file TargetRegistry.h.
| typedef MCAsmInfo*(* llvm::Target::MCAsmInfoCtorFnTy)(const MCRegisterInfo &MRI, StringRef TT) |
Definition at line 73 of file TargetRegistry.h.
| typedef MCTargetAsmParser*(* llvm::Target::MCAsmParserCtorTy)(MCSubtargetInfo &STI, MCAsmParser &P) |
Definition at line 98 of file TargetRegistry.h.
| typedef MCCodeEmitter*(* llvm::Target::MCCodeEmitterCtorTy)(const MCInstrInfo &II, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI, MCContext &Ctx) |
Definition at line 108 of file TargetRegistry.h.
| typedef MCCodeGenInfo*(* llvm::Target::MCCodeGenInfoCtorFnTy)(StringRef TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) |
Definition at line 75 of file TargetRegistry.h.
| typedef MCDisassembler*(* llvm::Target::MCDisassemblerCtorTy)(const Target &T, const MCSubtargetInfo &STI) |
Definition at line 100 of file TargetRegistry.h.
| typedef MCInstPrinter*(* llvm::Target::MCInstPrinterCtorTy)(const Target &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI) |
Definition at line 102 of file TargetRegistry.h.
| typedef MCInstrAnalysis*(* llvm::Target::MCInstrAnalysisCtorFnTy)(const MCInstrInfo *Info) |
Definition at line 80 of file TargetRegistry.h.
| typedef MCInstrInfo*(* llvm::Target::MCInstrInfoCtorFnTy)(void) |
Definition at line 79 of file TargetRegistry.h.
| typedef MCStreamer*(* llvm::Target::MCObjectStreamerCtorTy)(const Target &T, StringRef TT, MCContext &Ctx, MCAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) |
Definition at line 112 of file TargetRegistry.h.
| typedef MCRegisterInfo*(* llvm::Target::MCRegInfoCtorFnTy)(StringRef TT) |
Definition at line 81 of file TargetRegistry.h.
| typedef MCSubtargetInfo*(* llvm::Target::MCSubtargetInfoCtorFnTy)(StringRef TT, StringRef CPU, StringRef Features) |
Definition at line 82 of file TargetRegistry.h.
| typedef TargetMachine*(* llvm::Target::TargetMachineCtorTy)(const Target &T, StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) |
Definition at line 85 of file TargetRegistry.h.
| typedef unsigned(* llvm::Target::TripleMatchQualityFnTy)(const std::string &TT) |
Definition at line 71 of file TargetRegistry.h.
| llvm::Target::Target | ( | ) | [inline] |
Definition at line 210 of file TargetRegistry.h.
| 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 366 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 | useLoc, | ||
| bool | useCFI, | ||
| bool | useDwarfDirectory, | ||
| MCInstPrinter * | InstPrint, | ||
| MCCodeEmitter * | CE, | ||
| MCAsmBackend * | TAB, | ||
| bool | ShowInst | ||
| ) | const [inline] |
createAsmStreamer - Create a target specific MCStreamer.
Definition at line 421 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile().
| MCAsmBackend* llvm::Target::createMCAsmBackend | ( | StringRef | Triple, |
| StringRef | CPU | ||
| ) | const [inline] |
createMCAsmBackend - Create a target specific assembly parser.
| Triple | The target triple string. |
Definition at line 347 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.
| Triple | 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 269 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo(), and LLVMCreateDisasmCPU().
| MCTargetAsmParser* llvm::Target::createMCAsmParser | ( | MCSubtargetInfo & | STI, |
| MCAsmParser & | Parser | ||
| ) | const [inline] |
createMCAsmParser - Create a target specific assembly parser.
| Parser | The target independent parser implementation to use for parsing and lexing. |
Definition at line 357 of file TargetRegistry.h.
| MCCodeEmitter* llvm::Target::createMCCodeEmitter | ( | const MCInstrInfo & | II, |
| const MCRegisterInfo & | MRI, | ||
| const MCSubtargetInfo & | STI, | ||
| MCContext & | Ctx | ||
| ) | const [inline] |
createMCCodeEmitter - Create a target specific code emitter.
Definition at line 390 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
| MCCodeGenInfo* llvm::Target::createMCCodeGenInfo | ( | StringRef | Triple, |
| Reloc::Model | RM, | ||
| CodeModel::Model | CM, | ||
| CodeGenOpt::Level | OL | ||
| ) | const [inline] |
createMCCodeGenInfo - Create a MCCodeGenInfo implementation.
Definition at line 278 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::LLVMTargetMachine().
| MCDisassembler* llvm::Target::createMCDisassembler | ( | const MCSubtargetInfo & | STI | ) | const [inline] |
Definition at line 372 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] |
Definition at line 378 of file TargetRegistry.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), LLVMCreateDisasmCPU(), and LLVMSetDisasmOptions().
| MCInstrAnalysis* llvm::Target::createMCInstrAnalysis | ( | const MCInstrInfo * | Info | ) | const [inline] |
createMCInstrAnalysis - Create a MCInstrAnalysis implementation.
Definition at line 296 of file TargetRegistry.h.
| MCInstrInfo* llvm::Target::createMCInstrInfo | ( | ) | const [inline] |
createMCInstrInfo - Create a MCInstrInfo implementation.
Definition at line 288 of file TargetRegistry.h.
Referenced by createX86_32Disassembler(), createX86_64Disassembler(), and LLVMCreateDisasmCPU().
| MCStreamer* llvm::Target::createMCObjectStreamer | ( | StringRef | TT, |
| MCContext & | Ctx, | ||
| MCAsmBackend & | TAB, | ||
| raw_ostream & | _OS, | ||
| MCCodeEmitter * | _Emitter, | ||
| bool | RelaxAll, | ||
| bool | NoExecStack | ||
| ) | const [inline] |
createMCObjectStreamer - Create a target specific MCStreamer.
| TT | The target triple. |
| Ctx | The target context. |
| TAB | The target assembler backend object. Takes ownership. |
| _OS | The stream object. |
| _Emitter | The target independent assembler object.Takes ownership. |
| RelaxAll | Relax all fixups? |
| NoExecStack | Mark file as not needing a executable stack. |
Definition at line 408 of file TargetRegistry.h.
| MCRegisterInfo* llvm::Target::createMCRegInfo | ( | StringRef | Triple | ) | const [inline] |
createMCRegInfo - Create a MCRegisterInfo implementation.
Definition at line 304 of file TargetRegistry.h.
Referenced by createAArch64Disassembler(), createMips64Disassembler(), createMips64elDisassembler(), createMipsDisassembler(), createMipselDisassembler(), createXCoreDisassembler(), and LLVMCreateDisasmCPU().
| MCSubtargetInfo* llvm::Target::createMCSubtargetInfo | ( | StringRef | Triple, |
| StringRef | CPU, | ||
| StringRef | Features | ||
| ) | const [inline] |
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
| Triple | 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 319 of file TargetRegistry.h.
Referenced by LLVMCreateDisasmCPU().
| TargetMachine* llvm::Target::createTargetMachine | ( | 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 [inline] |
createTargetMachine - Create a target specific machine implementation for the specified Triple.
| Triple | 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 333 of file TargetRegistry.h.
Referenced by llvm::EngineBuilder::selectTarget().
| const char* llvm::Target::getName | ( | ) | const [inline] |
getName - Get the target name.
Definition at line 219 of file TargetRegistry.h.
| const Target* llvm::Target::getNext | ( | ) | const [inline] |
Definition at line 216 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 222 of file TargetRegistry.h.
| bool llvm::Target::hasAsmPrinter | ( | ) | const [inline] |
hasAsmPrinter - Check if this target supports .s printing.
Definition at line 241 of file TargetRegistry.h.
| bool llvm::Target::hasAsmStreamer | ( | ) | const [inline] |
hasAsmStreamer - Check if this target supports streaming to files.
Definition at line 256 of file TargetRegistry.h.
| bool llvm::Target::hasJIT | ( | ) | const [inline] |
hasJIT - Check if this targets supports the just-in-time compilation.
Definition at line 229 of file TargetRegistry.h.
Referenced by llvm::EngineBuilder::create(), and llvm::TargetRegistry::getClosestTargetForJIT().
| bool llvm::Target::hasMCAsmBackend | ( | ) | const [inline] |
hasMCAsmBackend - Check if this target supports .o generation.
Definition at line 235 of file TargetRegistry.h.
| bool llvm::Target::hasMCAsmParser | ( | ) | const [inline] |
hasAsmParser - Check if this target supports .s parsing.
Definition at line 238 of file TargetRegistry.h.
| bool llvm::Target::hasMCCodeEmitter | ( | ) | const [inline] |
hasMCCodeEmitter - Check if this target supports instruction encoding.
Definition at line 250 of file TargetRegistry.h.
| bool llvm::Target::hasMCDisassembler | ( | ) | const [inline] |
hasMCDisassembler - Check if this target has a disassembler.
Definition at line 244 of file TargetRegistry.h.
| bool llvm::Target::hasMCInstPrinter | ( | ) | const [inline] |
hasMCInstPrinter - Check if this target has an instruction printer.
Definition at line 247 of file TargetRegistry.h.
| bool llvm::Target::hasMCObjectStreamer | ( | ) | const [inline] |
hasMCObjectStreamer - Check if this target supports streaming to files.
Definition at line 253 of file TargetRegistry.h.
| bool llvm::Target::hasTargetMachine | ( | ) | const [inline] |
hasTargetMachine - Check if this target supports code generation.
Definition at line 232 of file TargetRegistry.h.
friend struct TargetRegistry [friend] |
Definition at line 69 of file TargetRegistry.h.