|
LLVM 24.0.0git
|
Target - Wrapper for Target specific information. More...
#include "llvm/MC/TargetRegistry.h"
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 |
| using | MCLFIRewriterCtorTy |
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. | |
Friends | |
| struct | TargetRegistry |
Feature Constructors | |
| 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 (const Triple &TT) const |
| Create a MCRegisterInfo implementation. | |
| 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 |
| 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 |
| MCLFIRewriter * | createMCLFIRewriter (MCContext &Ctx, std::unique_ptr< MCRegisterInfo > &&RegInfo, std::unique_ptr< MCInstrInfo > &&InstInfo) const |
| MCRelocationInfo * | createMCRelocationInfo (const Triple &TT, MCContext &Ctx) const |
| createMCRelocationInfo - Create a target specific MCRelocationInfo. | |
| 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. | |
| static LLVM_ABI bool | isValidFeatureListFormat (StringRef FeaturesString) |
| isValidFeatureListFormat - check that FeatureString has the format: "+attr1,+attr2,-attr3,...,+attrN" A comma separates each feature from the next (all lowercase). | |
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 138 of file TargetRegistry.h.
| using llvm::Target::ArchMatchFnTy = bool (*)(Triple::ArchType Arch) |
Definition at line 142 of file TargetRegistry.h.
Definition at line 163 of file TargetRegistry.h.
Definition at line 205 of file TargetRegistry.h.
Definition at line 202 of file TargetRegistry.h.
Definition at line 191 of file TargetRegistry.h.
Definition at line 219 of file TargetRegistry.h.
Definition at line 182 of file TargetRegistry.h.
Definition at line 224 of file TargetRegistry.h.
Definition at line 228 of file TargetRegistry.h.
Definition at line 187 of file TargetRegistry.h.
Definition at line 165 of file TargetRegistry.h.
Definition at line 144 of file TargetRegistry.h.
Definition at line 169 of file TargetRegistry.h.
Definition at line 180 of file TargetRegistry.h.
Definition at line 172 of file TargetRegistry.h.
Definition at line 175 of file TargetRegistry.h.
| using llvm::Target::MCInstrAnalysisCtorFnTy = MCInstrAnalysis *(*)(const MCInstrInfo *Info) |
Definition at line 151 of file TargetRegistry.h.
| using llvm::Target::MCInstrInfoCtorFnTy = MCInstrInfo *(*)() |
Definition at line 150 of file TargetRegistry.h.
Definition at line 232 of file TargetRegistry.h.
Definition at line 147 of file TargetRegistry.h.
| using llvm::Target::MCRegInfoCtorFnTy = MCRegisterInfo *(*)(const Triple &TT) |
Definition at line 152 of file TargetRegistry.h.
Definition at line 211 of file TargetRegistry.h.
Definition at line 153 of file TargetRegistry.h.
Definition at line 213 of file TargetRegistry.h.
| using llvm::Target::NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S) |
Definition at line 201 of file TargetRegistry.h.
Definition at line 209 of file TargetRegistry.h.
Definition at line 156 of file TargetRegistry.h.
Definition at line 195 of file TargetRegistry.h.
|
default |
Referenced by getNext().
|
inline |
createAsmPrinter - Create a target specific assembly printer pass.
This takes ownership of the MCStreamer object.
Definition at line 502 of file TargetRegistry.h.
References Streamer.
Referenced by llvm::CodeGenTargetMachineImpl::addAsmPrinter(), llvm::CodeGenTargetMachineImpl::addPassesToEmitMC(), llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().
| MCStreamer * Target::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 |
Definition at line 101 of file TargetRegistry.cpp.
References llvm::createAsmStreamer(), createAsmTargetStreamer(), and Printer.
Referenced by llvm::CodeGenTargetMachineImpl::createMCStreamer(), llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().
|
inline |
Definition at line 551 of file TargetRegistry.h.
Referenced by createAsmStreamer().
|
inline |
createCustomBehaviour - Create a target specific CustomBehaviour.
This class is used by llvm-mca and requires backend functionality.
Definition at line 615 of file TargetRegistry.h.
References llvm::SrcMgr.
|
inline |
createInstrPostProcess - Create a target specific InstrPostProcess.
This class is used by llvm-mca and requires backend functionality.
Definition at line 625 of file TargetRegistry.h.
|
inline |
createInstrumentManager - Create a target specific InstrumentManager.
This class is used by llvm-mca and requires backend functionality.
Definition at line 636 of file TargetRegistry.h.
|
inline |
createMCAsmBackend - Create a target specific assembly parser.
Definition at line 480 of file TargetRegistry.h.
References Options.
Referenced by llvm::CodeGenTargetMachineImpl::addPassesToEmitMC(), llvm::CodeGenTargetMachineImpl::createMCStreamer(), llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().
|
inline |
Create a MCAsmInfo implementation for the specified target triple.
| 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 400 of file TargetRegistry.h.
References Options.
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), LLVMCreateDisasmCPUFeatures(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
createMCAsmParser - Create a target specific assembly parser.
| Parser | The target independent parser implementation to use for parsing and lexing. |
Definition at line 492 of file TargetRegistry.h.
|
inline |
createMCCodeEmitter - Create a target specific code emitter.
Definition at line 526 of file TargetRegistry.h.
References II.
Referenced by llvm::CodeGenTargetMachineImpl::createMCStreamer(), llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().
|
inline |
Definition at line 509 of file TargetRegistry.h.
Referenced by LLVMCreateDisasmCPUFeatures(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
Definition at line 516 of file TargetRegistry.h.
References T.
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), LLVMCreateDisasmCPUFeatures(), LLVMSetDisasmOptions(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
createMCInstrAnalysis - Create a MCInstrAnalysis implementation.
Definition at line 430 of file TargetRegistry.h.
|
inline |
createMCInstrInfo - Create a MCInstrInfo implementation.
Definition at line 422 of file TargetRegistry.h.
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), llvm::initializeLFIMCStreamer(), LLVMCreateDisasmCPUFeatures(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
Definition at line 572 of file TargetRegistry.h.
Referenced by llvm::initializeLFIMCStreamer().
|
inline |
Create a MCObjectFileInfo implementation for the specified target triple.
Definition at line 410 of file TargetRegistry.h.
References llvm::MCObjectFileInfo::initMCObjectFileInfo(), and PIC.
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), and llvm::dwarf_linker::parallel::DwarfEmitterImpl::init().
| MCStreamer * Target::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.
| 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 44 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::initializeLFIMCStreamer(), 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().
|
inline |
Create a MCRegisterInfo implementation.
Definition at line 437 of file TargetRegistry.h.
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), llvm::initializeLFIMCStreamer(), LLVMCreateDisasmCPUFeatures(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
createMCRelocationInfo - Create a target specific MCRelocationInfo.
| TT | The target triple. |
| Ctx | The target context. |
Definition at line 583 of file TargetRegistry.h.
References llvm::createMCRelocationInfo().
Referenced by LLVMCreateDisasmCPUFeatures().
|
inline |
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
| 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 452 of file TargetRegistry.h.
References isValidFeatureListFormat().
Referenced by llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), LLVMCreateDisasmCPUFeatures(), and llvm::logicalview::LVBinaryReader::loadGenericTargetInfo().
|
inline |
createMCSymbolizer - Create a target specific MCSymbolizer.
| 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 604 of file TargetRegistry.h.
References llvm::createMCSymbolizer().
Referenced by LLVMCreateDisasmCPUFeatures().
|
inline |
Definition at line 559 of file TargetRegistry.h.
References llvm::createNullStreamer(), and createNullTargetStreamer().
|
inline |
Definition at line 565 of file TargetRegistry.h.
Referenced by createNullStreamer().
|
inline |
createTargetMachine - Create a target specific machine implementation for the specified Triple.
| 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. |
Definition at line 468 of file TargetRegistry.h.
References llvm::Default, and Options.
Referenced by llvm::ThinLTOCodeGeneratorImpl::TargetMachineBuilder::create(), createTargetMachine(), createTargetMachine(), llvm::codegen::createTargetMachineForTriple(), llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), llvm::EngineBuilder::selectTarget(), and llvm::SPIRVTranslate().
getBackendName - Get the backend name.
Definition at line 371 of file TargetRegistry.h.
getName - Get the target name.
Definition at line 365 of file TargetRegistry.h.
Referenced by llvm::jitlink::TableManager< TableManagerImplT >::getEntryForTarget(), llvm::jitlink::PerGraphGOTAndPLTStubsBuilder< BuilderImplT >::getGOTEntry(), llvm::jitlink::PerGraphGOTAndPLTStubsBuilder< BuilderImplT >::getPLTStub(), llvm::MachObjectWriter::getSymbolAddress(), llvm::logicalview::LVScope::markMissingParents(), llvm::logicalview::LVSymbol::markMissingParents(), llvm::logicalview::LVType::markMissingParents(), llvm::jitlink::TableManager< TableManagerImplT >::registerPreExistingEntry(), llvm::jitlink::aarch32::StubsManager_prev7::visitEdge(), and llvm::jitlink::aarch32::StubsManager_v7::visitEdge().
Definition at line 362 of file TargetRegistry.h.
References Target().
getShortDescription - Get a short description of the target.
Definition at line 368 of file TargetRegistry.h.
Referenced by llvm::TargetRegistry::printRegisteredTargetsForVersion().
|
inline |
hasJIT - Check if this targets supports the just-in-time compilation.
Definition at line 378 of file TargetRegistry.h.
Referenced by llvm::EngineBuilder::create().
|
inline |
hasMCAsmBackend - Check if this target supports .o generation.
Definition at line 384 of file TargetRegistry.h.
|
inline |
hasMCAsmParser - Check if this target supports assembly parsing.
Definition at line 387 of file TargetRegistry.h.
|
inline |
hasTargetMachine - Check if this target supports code generation.
Definition at line 381 of file TargetRegistry.h.
isValidFeatureListFormat - check that FeatureString has the format: "+attr1,+attr2,-attr3,...,+attrN" A comma separates each feature from the next (all lowercase).
Each of the remaining features is prefixed with '+' or '-' indicating whether that feature should be enabled or disabled contrary to the cpu specification. The string must match exactly that format otherwise MCSubtargetInfo::ApplyFeatureFlag will fail. For example feature string "+a,+m,c" is accepted, and results in feature list {"+a", "+m", "c"}. Later in ApplyFeatureFlag, it asserts that all features must start with '+' or '-' and assert is failed.
Definition at line 27 of file TargetRegistry.cpp.
References llvm::StringRef::empty(), I, and llvm::StringRef::size().
Referenced by createMCSubtargetInfo().
|
friend |
Definition at line 140 of file TargetRegistry.h.
References TargetRegistry.
Referenced by TargetRegistry.