LLVM  mainline
Classes | Static Public Member Functions
llvm::TargetRegistry Struct Reference

TargetRegistry - Generic interface to target specific features. More...

#include <TargetRegistry.h>

List of all members.

Classes

class  iterator

Static Public Member Functions

static void printRegisteredTargetsForVersion ()
static void RegisterTarget (Target &T, const char *Name, const char *ShortDesc, Target::ArchMatchFnTy ArchMatchFn, bool HasJIT=false)
static void RegisterMCAsmInfo (Target &T, Target::MCAsmInfoCtorFnTy Fn)
static void RegisterMCCodeGenInfo (Target &T, Target::MCCodeGenInfoCtorFnTy Fn)
static void RegisterMCInstrInfo (Target &T, Target::MCInstrInfoCtorFnTy Fn)
static void RegisterMCInstrAnalysis (Target &T, Target::MCInstrAnalysisCtorFnTy Fn)
static void RegisterMCRegInfo (Target &T, Target::MCRegInfoCtorFnTy Fn)
static void RegisterMCSubtargetInfo (Target &T, Target::MCSubtargetInfoCtorFnTy Fn)
static void RegisterTargetMachine (Target &T, Target::TargetMachineCtorTy Fn)
static void RegisterMCAsmBackend (Target &T, Target::MCAsmBackendCtorTy Fn)
static void RegisterMCAsmParser (Target &T, Target::MCAsmParserCtorTy Fn)
static void RegisterAsmPrinter (Target &T, Target::AsmPrinterCtorTy Fn)
static void RegisterMCDisassembler (Target &T, Target::MCDisassemblerCtorTy Fn)
static void RegisterMCInstPrinter (Target &T, Target::MCInstPrinterCtorTy Fn)
static void RegisterMCCodeEmitter (Target &T, Target::MCCodeEmitterCtorTy Fn)
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)
static void RegisterMCSymbolizer (Target &T, Target::MCSymbolizerCtorTy Fn)
Registry Access
static iterator begin ()
static iterator end ()
static const TargetlookupTarget (const std::string &Triple, std::string &Error)
static const TargetlookupTarget (const std::string &ArchName, Triple &TheTriple, std::string &Error)

Detailed Description

TargetRegistry - Generic interface to target specific features.

Definition at line 539 of file TargetRegistry.h.


Member Function Documentation

static iterator llvm::TargetRegistry::end ( ) [inline, static]
const Target * TargetRegistry::lookupTarget ( const std::string &  Triple,
std::string &  Error 
) [static]

lookupTarget - Lookup a target based on a target triple.

Parameters:
Triple- The triple to use for finding a target.
Error- On failure, an error string describing why no target was found.

Definition at line 66 of file TargetRegistry.cpp.

References begin(), end(), and llvm::Triple::getArch().

Referenced by llvm::object::IRObjectFile::IRObjectFile(), LLVMCreateDisasmCPUFeatures(), LLVMGetTargetFromTriple(), lookupTarget(), and llvm::EngineBuilder::selectTarget().

const Target * TargetRegistry::lookupTarget ( const std::string &  ArchName,
Triple TheTriple,
std::string &  Error 
) [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.

Parameters:
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 begin(), end(), llvm::Triple::getArchTypeForLLVMName(), llvm::Triple::getTriple(), lookupTarget(), llvm::Triple::setArch(), and llvm::Triple::UnknownArch.

printRegisteredTargetsForVersion - Print the registered targets appropriately for inclusion in a tool's version output.

Definition at line 123 of file TargetRegistry.cpp.

References llvm::array_pod_sort(), begin(), end(), I, llvm::outs(), and TargetArraySortFn().

static void llvm::TargetRegistry::RegisterAsmPrinter ( Target T,
Target::AsmPrinterCtorTy  Fn 
) [inline, static]

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.

Parameters:
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 LLVMInitializePowerPCAsmPrinter(), and LLVMInitializeR600AsmPrinter().

static void llvm::TargetRegistry::RegisterCOFFStreamer ( Target T,
Target::COFFStreamerCtorTy  Fn 
) [inline, static]

Definition at line 801 of file TargetRegistry.h.

Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeX86TargetMC().

static void llvm::TargetRegistry::RegisterELFStreamer ( Target T,
Target::ELFStreamerCtorTy  Fn 
) [inline, static]
static void llvm::TargetRegistry::RegisterMachOStreamer ( Target T,
Target::MachOStreamerCtorTy  Fn 
) [inline, static]

Definition at line 805 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), and LLVMInitializeARMTargetMC().

static void llvm::TargetRegistry::RegisterMCAsmBackend ( Target T,
Target::MCAsmBackendCtorTy  Fn 
) [inline, static]

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.

Parameters:
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(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), and LLVMInitializeX86TargetMC().

static void llvm::TargetRegistry::RegisterMCAsmInfo ( Target T,
Target::MCAsmInfoCtorFnTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct a MCAsmInfo for the target.

Definition at line 641 of file TargetRegistry.h.

Referenced by LLVMInitializeSystemZTargetMC(), and llvm::RegisterMCAsmInfoFn::RegisterMCAsmInfoFn().

static void llvm::TargetRegistry::RegisterMCAsmParser ( Target T,
Target::MCAsmParserCtorTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct an MCTargetAsmParser for the target.

Definition at line 742 of file TargetRegistry.h.

static void llvm::TargetRegistry::RegisterMCCodeEmitter ( Target T,
Target::MCCodeEmitterCtorTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct an MCCodeEmitter for the target.

Definition at line 796 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), and LLVMInitializeX86TargetMC().

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.

Parameters:
T- The target being registered.
Fn- A function to construct a MCCodeGenInfo for the target.

Definition at line 654 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeXCoreTargetMC(), and llvm::RegisterMCCodeGenInfoFn::RegisterMCCodeGenInfoFn().

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.

Parameters:
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().

static void llvm::TargetRegistry::RegisterMCInstPrinter ( Target T,
Target::MCInstPrinterCtorTy  Fn 
) [inline, static]

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.

Parameters:
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(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonAsmPrinter(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), and LLVMInitializeXCoreTargetMC().

static void llvm::TargetRegistry::RegisterMCInstrInfo ( Target T,
Target::MCInstrInfoCtorFnTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct a MCInstrInfo for the target.

Definition at line 668 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), and llvm::RegisterMCInstrInfoFn::RegisterMCInstrInfoFn().

static void llvm::TargetRegistry::RegisterMCRegInfo ( Target T,
Target::MCRegInfoCtorFnTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct a MCRegisterInfo for the target.

Definition at line 688 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), and llvm::RegisterMCRegInfoFn::RegisterMCRegInfoFn().

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.

Parameters:
T- The target being registered.
Fn- A function to construct an MCRelocationInfo for the target.

Definition at line 839 of file TargetRegistry.h.

Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeX86TargetMC().

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.

Parameters:
T- The target being registered.
Fn- A function to construct a MCSubtargetInfo for the target.

Definition at line 701 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64TargetMC(), LLVMInitializeARMTargetMC(), LLVMInitializeBPFTargetMC(), LLVMInitializeHexagonTargetMC(), LLVMInitializeMipsTargetMC(), LLVMInitializeMSP430TargetMC(), LLVMInitializeNVPTXTargetMC(), LLVMInitializePowerPCTargetMC(), LLVMInitializeR600TargetMC(), LLVMInitializeSparcTargetMC(), LLVMInitializeSystemZTargetMC(), LLVMInitializeX86TargetMC(), LLVMInitializeXCoreTargetMC(), and llvm::RegisterMCSubtargetInfoFn::RegisterMCSubtargetInfoFn().

static void llvm::TargetRegistry::RegisterMCSymbolizer ( Target T,
Target::MCSymbolizerCtorTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct an MCSymbolizer for the target.

Definition at line 853 of file TargetRegistry.h.

Referenced by LLVMInitializeAArch64Disassembler().

Definition at line 815 of file TargetRegistry.h.

Referenced by LLVMInitializeARMTargetMC(), and LLVMInitializeMipsTargetMC().

void TargetRegistry::RegisterTarget ( Target T,
const char *  Name,
const char *  ShortDesc,
Target::ArchMatchFnTy  ArchMatchFn,
bool  HasJIT = false 
) [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.

Parameters:
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 95 of file TargetRegistry.cpp.

References FirstTarget, Name, and T.

Referenced by LLVMInitializeAArch64TargetInfo(), and LLVMInitializeCppBackendTargetInfo().

static void llvm::TargetRegistry::RegisterTargetMachine ( Target T,
Target::TargetMachineCtorTy  Fn 
) [inline, static]

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.

Parameters:
T- The target being registered.
Fn- A function to construct a TargetMachine for the target.

Definition at line 715 of file TargetRegistry.h.


The documentation for this struct was generated from the following files: