Go to the documentation of this file.
13 #ifndef LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H
14 #define LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H
72 return TM.takeError();
73 return (*TM)->createDataLayout();
83 const std::string &
getCPU()
const {
return CPU; }
105 this->OptLevel = OptLevel;
117 addFeatures(
const std::vector<std::string> &FeatureVec);
163 : JTMB(JTMB), Indent(Indent) {}
181 #endif // LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H
Expected< DataLayout > getDefaultDataLayoutForTarget()
Get the default DataLayout for the target.
A utility class for building TargetMachines for JITs.
This is an optimization pass for GlobalISel generic memory operations.
Expected< std::unique_ptr< TargetMachine > > createTargetMachine()
Create a TargetMachine.
friend raw_ostream & operator<<(raw_ostream &OS, const JITTargetMachineBuilderPrinter &JTMBP)
const SubtargetFeatures & getFeatures() const
Access subtarget features.
const TargetOptions & getOptions() const
Access TargetOptions.
Triple - Helper class for working with autoconf configuration names.
SubtargetFeatures & getFeatures()
Access subtarget features.
JITTargetMachineBuilder & setRelocationModel(Optional< Reloc::Model > RM)
Set the relocation model.
Tagged union holding either a T or a Error.
const Triple & getTargetTriple() const
Access Triple.
JITTargetMachineBuilder & setCodeModel(Optional< CodeModel::Model > CM)
Set the code model.
Manages the enabling and disabling of subtarget specific features.
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
This class implements an extremely fast bulk output stream that can only output to a stream.
static Expected< JITTargetMachineBuilder > detectHost()
Create a JITTargetMachineBuilder for the host system.
JITTargetMachineBuilder & setCPU(std::string CPU)
Set the CPU string.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
JITTargetMachineBuilder(Triple TT)
Create a JITTargetMachineBuilder based on the given triple.
StringRef - Represent a constant reference to a string, i.e.
const Optional< CodeModel::Model > & getCodeModel() const
Get the code model.
JITTargetMachineBuilder & setFeatures(StringRef FeatureString)
Set subtarget features.
JITTargetMachineBuilder & setCodeGenOptLevel(CodeGenOpt::Level OptLevel)
Set the LLVM CodeGen optimization level.
TargetOptions & getOptions()
Access TargetOptions.
JITTargetMachineBuilder & addFeatures(const std::vector< std::string > &FeatureVec)
Add subtarget features.
Triple & getTargetTriple()
Access Triple.
const char LLVMTargetMachineRef TM
JITTargetMachineBuilderPrinter(JITTargetMachineBuilder &JTMB, StringRef Indent)
const std::string & getCPU() const
Returns the CPU string.
const Optional< Reloc::Model > & getRelocationModel() const
Get the relocation model.
JITTargetMachineBuilder & setOptions(TargetOptions Options)
Set TargetOptions.
void print(raw_ostream &OS) const