|
LLVM
3.7.0
|
TargetRegistry - Generic interface to target specific features. More...
#include <TargetRegistry.h>
Classes | |
| class | iterator |
Public Member Functions | |
| TargetRegistry ()=delete | |
Static Public Member Functions | |
| static void | printRegisteredTargetsForVersion () |
| printRegisteredTargetsForVersion - Print the registered targets appropriately for inclusion in a tool's version output. More... | |
Registry Access | |
| static iterator_range< iterator > | targets () |
| static const Target * | lookupTarget (const std::string &Triple, std::string &Error) |
| lookupTarget - Lookup a target based on a target triple. More... | |
| static const Target * | lookupTarget (const std::string &ArchName, Triple &TheTriple, std::string &Error) |
| lookupTarget - Lookup a target based on an architecture name and a target triple. More... | |
Target Registration | |
| static void | RegisterTarget (Target &T, const char *Name, const char *ShortDesc, Target::ArchMatchFnTy ArchMatchFn, bool HasJIT=false) |
| RegisterTarget - Register the given target. More... | |
| static void | RegisterMCAsmInfo (Target &T, Target::MCAsmInfoCtorFnTy Fn) |
| RegisterMCAsmInfo - Register a MCAsmInfo implementation for the given target. More... | |
| static void | RegisterMCCodeGenInfo (Target &T, Target::MCCodeGenInfoCtorFnTy Fn) |
| RegisterMCCodeGenInfo - Register a MCCodeGenInfo implementation for the given target. More... | |
| static void | RegisterMCInstrInfo (Target &T, Target::MCInstrInfoCtorFnTy Fn) |
| RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target. More... | |
| static void | RegisterMCInstrAnalysis (Target &T, Target::MCInstrAnalysisCtorFnTy Fn) |
| RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target. More... | |
| static void | RegisterMCRegInfo (Target &T, Target::MCRegInfoCtorFnTy Fn) |
| RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target. More... | |
| static void | RegisterMCSubtargetInfo (Target &T, Target::MCSubtargetInfoCtorFnTy Fn) |
| RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target. More... | |
| static void | RegisterTargetMachine (Target &T, Target::TargetMachineCtorTy Fn) |
| RegisterTargetMachine - Register a TargetMachine implementation for the given target. More... | |
| static void | RegisterMCAsmBackend (Target &T, Target::MCAsmBackendCtorTy Fn) |
| RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target. More... | |
| static void | RegisterMCAsmParser (Target &T, Target::MCAsmParserCtorTy Fn) |
| RegisterMCAsmParser - Register a MCTargetAsmParser implementation for the given target. More... | |
| static void | RegisterAsmPrinter (Target &T, Target::AsmPrinterCtorTy Fn) |
| RegisterAsmPrinter - Register an AsmPrinter implementation for the given target. More... | |
| static void | RegisterMCDisassembler (Target &T, Target::MCDisassemblerCtorTy Fn) |
| RegisterMCDisassembler - Register a MCDisassembler implementation for the given target. More... | |
| static void | RegisterMCInstPrinter (Target &T, Target::MCInstPrinterCtorTy Fn) |
| RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target. More... | |
| static void | RegisterMCCodeEmitter (Target &T, Target::MCCodeEmitterCtorTy Fn) |
| RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target. More... | |
| static void | RegisterCOFFStreamer (Target &T, Target::COFFStreamerCtorTy Fn) |
| static void | RegisterMachOStreamer (Target &T, Target::MachOStreamerCtorTy Fn) |
| static void | RegisterELFStreamer (Target &T, Target::ELFStreamerCtorTy Fn) |
| static void | RegisterNullTargetStreamer (Target &T, Target::NullTargetStreamerCtorTy Fn) |
| static void | RegisterAsmTargetStreamer (Target &T, Target::AsmTargetStreamerCtorTy Fn) |
| static void | RegisterObjectTargetStreamer (Target &T, Target::ObjectTargetStreamerCtorTy Fn) |
| static void | RegisterMCRelocationInfo (Target &T, Target::MCRelocationInfoCtorTy Fn) |
| RegisterMCRelocationInfo - Register an MCRelocationInfo implementation for the given target. More... | |
| static void | RegisterMCSymbolizer (Target &T, Target::MCSymbolizerCtorTy Fn) |
| RegisterMCSymbolizer - Register an MCSymbolizer implementation for the given target. More... | |
TargetRegistry - Generic interface to target specific features.
Definition at line 541 of file TargetRegistry.h.
|
delete |
|
static |
lookupTarget - Lookup a target based on a target triple.
| Triple | - The triple to use for finding a target. |
| Error | - On failure, an error string describing why no target was found. |
Definition at line 64 of file TargetRegistry.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), llvm::Triple::getArch(), I, T, and targets().
Referenced by llvm::object::IRObjectFile::IRObjectFile(), LLVMCreateDisasmCPUFeatures(), LLVMGetTargetFromTriple(), lookupTarget(), and llvm::EngineBuilder::selectTarget().
|
static |
lookupTarget - Lookup a target based on an architecture name and a target triple.
If the architecture name is non-empty, then the lookup is done by architecture. Otherwise, the target triple is used.
| ArchName | - The architecture to use for finding a target. |
| TheTriple | - The triple to use for finding a target. The triple is updated with canonical architecture name if a lookup by architecture is done. |
| Error | - On failure, an error string describing why no target was found. |
Definition at line 25 of file TargetRegistry.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), llvm::Triple::getArchTypeForLLVMName(), llvm::Target::getName(), llvm::Triple::getTriple(), I, lookupTarget(), llvm::Triple::setArch(), targets(), and llvm::Triple::UnknownArch.
|
static |
printRegisteredTargetsForVersion - Print the registered targets appropriately for inclusion in a tool's version output.
Definition at line 119 of file TargetRegistry.cpp.
References llvm::array_pod_sort(), llvm::outs(), T, TargetArraySortFn(), and targets().
|
inlinestatic |
RegisterAsmPrinter - Register an AsmPrinter implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an AsmPrinter for the target. |
Definition at line 755 of file TargetRegistry.h.
Referenced by LLVMInitializeAMDGPUAsmPrinter(), LLVMInitializePowerPCAsmPrinter(), and llvm::RegisterAsmPrinter< AsmPrinterImpl >::RegisterAsmPrinter().
|
inlinestatic |
Definition at line 816 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), and LLVMInitializeXCoreTargetMC().
|
inlinestatic |
Definition at line 799 of file TargetRegistry.h.
Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeX86TargetMC().
|
inlinestatic |
Definition at line 807 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), and LLVMInitializeMipsTargetMC().
|
inlinestatic |
Definition at line 803 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), and LLVMInitializeARMTargetMC().
|
inlinestatic |
RegisterMCAsmBackend - Register a MCAsmBackend implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an AsmBackend for the target. |
Definition at line 729 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), and llvm::RegisterMCAsmBackend< MCAsmBackendImpl >::RegisterMCAsmBackend().
|
inlinestatic |
RegisterMCAsmInfo - Register a MCAsmInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
Definition at line 642 of file TargetRegistry.h.
Referenced by LLVMInitializeSystemZTargetMC(), llvm::RegisterMCAsmInfo< MCAsmInfoImpl >::RegisterMCAsmInfo(), and llvm::RegisterMCAsmInfoFn::RegisterMCAsmInfoFn().
|
inlinestatic |
RegisterMCAsmParser - Register a MCTargetAsmParser implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCTargetAsmParser for the target. |
Definition at line 742 of file TargetRegistry.h.
Referenced by llvm::RegisterMCAsmParser< MCAsmParserImpl >::RegisterMCAsmParser().
|
inlinestatic |
RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCCodeEmitter for the target. |
Definition at line 795 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), and llvm::RegisterMCCodeEmitter< MCCodeEmitterImpl >::RegisterMCCodeEmitter().
|
inlinestatic |
RegisterMCCodeGenInfo - Register a MCCodeGenInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct a MCCodeGenInfo for the target. |
Definition at line 655 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeXCoreTargetMC(), llvm::RegisterMCCodeGenInfo< MCCodeGenInfoImpl >::RegisterMCCodeGenInfo(), and llvm::RegisterMCCodeGenInfoFn::RegisterMCCodeGenInfoFn().
|
inlinestatic |
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCDisassembler for the target. |
Definition at line 768 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64Disassembler(), LLVMInitializeARMDisassembler(), LLVMInitializeHexagonDisassembler(), LLVMInitializeMipsDisassembler(), LLVMInitializePowerPCDisassembler(), LLVMInitializeSparcDisassembler(), LLVMInitializeSystemZDisassembler(), LLVMInitializeX86Disassembler(), and LLVMInitializeXCoreDisassembler().
|
inlinestatic |
RegisterMCInstPrinter - Register a MCInstPrinter implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCInstPrinter for the target. |
Definition at line 782 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeWebAssemblyTargetMC(), LLVMInitializeX86TargetMC(), and LLVMInitializeXCoreTargetMC().
|
inlinestatic |
RegisterMCInstrAnalysis - Register a MCInstrAnalysis implementation for the given target.
Definition at line 675 of file TargetRegistry.h.
Referenced by LLVMInitializeARMTargetMC(), LLVMInitializeX86TargetMC(), llvm::RegisterMCInstrAnalysis< MCInstrAnalysisImpl >::RegisterMCInstrAnalysis(), and llvm::RegisterMCInstrAnalysisFn::RegisterMCInstrAnalysisFn().
|
inlinestatic |
RegisterMCInstrInfo - Register a MCInstrInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct a MCInstrInfo for the target. |
Definition at line 669 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), llvm::RegisterMCInstrInfo< MCInstrInfoImpl >::RegisterMCInstrInfo(), and llvm::RegisterMCInstrInfoFn::RegisterMCInstrInfoFn().
|
inlinestatic |
RegisterMCRegInfo - Register a MCRegisterInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct a MCRegisterInfo for the target. |
Definition at line 689 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), llvm::RegisterMCRegInfo< MCRegisterInfoImpl >::RegisterMCRegInfo(), and llvm::RegisterMCRegInfoFn::RegisterMCRegInfoFn().
|
inlinestatic |
RegisterMCRelocationInfo - Register an MCRelocationInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCRelocationInfo for the target. |
Definition at line 836 of file TargetRegistry.h.
Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeX86TargetMC().
|
inlinestatic |
RegisterMCSubtargetInfo - Register a MCSubtargetInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct a MCSubtargetInfo for the target. |
Definition at line 702 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), llvm::RegisterMCSubtargetInfo< MCSubtargetInfoImpl >::RegisterMCSubtargetInfo(), and llvm::RegisterMCSubtargetInfoFn::RegisterMCSubtargetInfoFn().
|
inlinestatic |
RegisterMCSymbolizer - Register an MCSymbolizer implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct an MCSymbolizer for the target. |
Definition at line 850 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64Disassembler().
|
inlinestatic |
Definition at line 811 of file TargetRegistry.h.
Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeMipsTargetMC().
|
inlinestatic |
Definition at line 822 of file TargetRegistry.h.
Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeAMDGPUTargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), and LLVMInitializeSparcTargetMC().
|
static |
RegisterTarget - Register the given target.
Attempts to register a target which has already been registered will be ignored.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Name | - The target name. This should be a static string. |
| ShortDesc | - A short target description. This should be a static string. |
| ArchMatchFn | - The arch match checking function for this target. |
| HasJIT | - Whether the target supports JIT code generation. |
Definition at line 91 of file TargetRegistry.cpp.
References FirstTarget, and T.
Referenced by LLVMInitializeAArch64TargetInfo(), LLVMInitializeBPFTargetInfo(), LLVMInitializeCppBackendTargetInfo(), and llvm::RegisterTarget< TargetArchType, HasJIT >::RegisterTarget().
|
inlinestatic |
RegisterTargetMachine - Register a TargetMachine implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. |
| Fn | - A function to construct a TargetMachine for the target. |
Definition at line 716 of file TargetRegistry.h.
Referenced by llvm::RegisterTargetMachine< TargetMachineImpl >::RegisterTargetMachine().
|
static |
Definition at line 21 of file TargetRegistry.cpp.
References FirstTarget, and llvm::make_range().
Referenced by LLVMGetFirstTarget(), LLVMGetTargetFromName(), lookupTarget(), printRegisteredTargetsForVersion(), and llvm::EngineBuilder::selectTarget().
1.8.6