LLVM
8.0.1
|
A utility class for building TargetMachines for JITs. More...
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
Static Public Member Functions | |
static Expected< JITTargetMachineBuilder > | detectHost () |
Create a JITTargetMachineBuilder for the host system. More... | |
A utility class for building TargetMachines for JITs.
Definition at line 32 of file JITTargetMachineBuilder.h.
llvm::orc::JITTargetMachineBuilder::JITTargetMachineBuilder | ( | Triple | TT | ) |
Create a JITTargetMachineBuilder based on the given triple.
Note: TargetOptions is default-constructed, then EmulatedTLS and ExplicitEmulatedTLS are set to true. If EmulatedTLS is not required, these values should be reset before calling createTargetMachine.
Definition at line 17 of file JITTargetMachineBuilder.cpp.
References llvm::TargetOptions::EmulatedTLS, and llvm::TargetOptions::ExplicitEmulatedTLS.
Referenced by detectHost().
JITTargetMachineBuilder & llvm::orc::JITTargetMachineBuilder::addFeatures | ( | const std::vector< std::string > & | FeatureVec | ) |
Add subtarget features.
Definition at line 47 of file JITTargetMachineBuilder.cpp.
References llvm::SubtargetFeatures::AddFeature(), and F().
Referenced by setCodeGenOptLevel().
Expected< std::unique_ptr< TargetMachine > > llvm::orc::JITTargetMachineBuilder::createTargetMachine | ( | ) |
Create a TargetMachine.
This operation will fail if the requested target is not registered, in which case see llvm/Support/TargetSelect.h. To JIT IR the Target and the target's AsmPrinter must both be registered. To JIT assembly (including inline and module level assembly) the target's AsmParser must also be registered.
Definition at line 30 of file JITTargetMachineBuilder.cpp.
References llvm::SubtargetFeatures::getString(), llvm::Triple::getTriple(), llvm::inconvertibleErrorCode(), llvm::TargetRegistry::lookupTarget(), and llvm::SystemZISD::TM.
Referenced by llvm::orc::LLJIT::Create(), llvm::orc::LLLazyJIT::Create(), and getDefaultDataLayoutForTarget().
|
static |
Create a JITTargetMachineBuilder for the host system.
Note: TargetOptions is default-constructed, then EmulatedTLS and ExplicitEmulatedTLS are set to true. If EmulatedTLS is not required, these values should be reset before calling createTargetMachine.
Definition at line 23 of file JITTargetMachineBuilder.cpp.
References llvm::sys::getProcessTriple(), and JITTargetMachineBuilder().
|
inline |
Get the default DataLayout for the target.
Note: This is reasonably expensive, as it creates a temporary TargetMachine instance under the hood. It is only suitable for use during JIT setup.
Definition at line 64 of file JITTargetMachineBuilder.h.
References createTargetMachine(), and llvm::SystemZISD::TM.
|
inline |
Access subtarget features.
Definition at line 100 of file JITTargetMachineBuilder.h.
|
inline |
Access subtarget features.
Definition at line 103 of file JITTargetMachineBuilder.h.
|
inline |
Access TargetOptions.
Definition at line 106 of file JITTargetMachineBuilder.h.
|
inline |
Access TargetOptions.
Definition at line 109 of file JITTargetMachineBuilder.h.
|
inline |
Access Triple.
Definition at line 112 of file JITTargetMachineBuilder.h.
Referenced by llvm::orc::LLLazyJIT::Create().
Access Triple.
Definition at line 115 of file JITTargetMachineBuilder.h.
References llvm::CodeGenOpt::None.
|
inline |
Set the LLVM CodeGen optimization level.
Definition at line 90 of file JITTargetMachineBuilder.h.
References addFeatures().
|
inline |
Set the code model.
Definition at line 84 of file JITTargetMachineBuilder.h.
|
inline |
Set the CPU string.
Definition at line 72 of file JITTargetMachineBuilder.h.
|
inline |
Set the relocation model.
Definition at line 78 of file JITTargetMachineBuilder.h.