|
LLVM
10.0.0
|
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 31 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.
| JITTargetMachineBuilder & llvm::orc::JITTargetMachineBuilder::addFeatures | ( | const std::vector< std::string > & | FeatureVec | ) |
Add subtarget features.
Definition at line 59 of file JITTargetMachineBuilder.cpp.
References llvm::SubtargetFeatures::AddFeature(), and F().
Referenced by setFeatures().
| 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 42 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::createCompileFunction(), getDefaultDataLayoutForTarget(), and llvm::orc::ConcurrentIRCompiler::operator()().
|
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::SubtargetFeatures::AddFeature(), getFeatures(), llvm::sys::getHostCPUFeatures(), llvm::sys::getHostCPUName(), llvm::sys::getProcessTriple(), and setCPU().
Referenced by llvm::orc::LLJITBuilderState::prepareForConstruction().
|
inline |
Get the code model.
Definition at line 92 of file JITTargetMachineBuilder.h.
|
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 63 of file JITTargetMachineBuilder.h.
References createTargetMachine(), and llvm::SystemZISD::TM.
|
inline |
Access subtarget features.
Definition at line 111 of file JITTargetMachineBuilder.h.
Referenced by detectHost().
|
inline |
Access subtarget features.
Definition at line 114 of file JITTargetMachineBuilder.h.
|
inline |
Access TargetOptions.
Definition at line 128 of file JITTargetMachineBuilder.h.
|
inline |
Access TargetOptions.
Definition at line 131 of file JITTargetMachineBuilder.h.
|
inline |
Get the relocation model.
Definition at line 83 of file JITTargetMachineBuilder.h.
|
inline |
Access Triple.
Definition at line 134 of file JITTargetMachineBuilder.h.
Access Triple.
Definition at line 137 of file JITTargetMachineBuilder.h.
References llvm::CodeGenOpt::None.
|
inline |
Set the LLVM CodeGen optimization level.
Definition at line 95 of file JITTargetMachineBuilder.h.
|
inline |
Set the code model.
Definition at line 86 of file JITTargetMachineBuilder.h.
|
inline |
Set the CPU string.
Definition at line 71 of file JITTargetMachineBuilder.h.
Referenced by detectHost().
|
inline |
Set subtarget features.
Definition at line 101 of file JITTargetMachineBuilder.h.
References addFeatures().
|
inline |
Set TargetOptions.
Note: This operation will overwrite any previously configured options, including EmulatedTLS and ExplicitEmulatedTLS which the JITTargetMachineBuilder sets by default. Clients are responsible for re-enabling these overwritten options.
Definition at line 122 of file JITTargetMachineBuilder.h.
|
inline |
Set the relocation model.
Definition at line 77 of file JITTargetMachineBuilder.h.
1.8.13