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; }
101 const std::optional<CodeModel::Model> &
getCodeModel()
const {
return CM; }
105 this->OptLevel = OptLevel;
117 addFeatures(
const std::vector<std::string> &FeatureVec);
153 std::optional<Reloc::Model>
RM;
154 std::optional<CodeModel::Model> CM;
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.
const std::optional< Reloc::Model > & getRelocationModel() const
Get the relocation model.
friend raw_ostream & operator<<(raw_ostream &OS, const JITTargetMachineBuilderPrinter &JTMBP)
const SubtargetFeatures & getFeatures() const
Access subtarget features.
const TargetOptions & getOptions() const
Access TargetOptions.
JITTargetMachineBuilder & setRelocationModel(std::optional< Reloc::Model > RM)
Set the relocation model.
Triple - Helper class for working with autoconf configuration names.
SubtargetFeatures & getFeatures()
Access subtarget features.
Tagged union holding either a T or a Error.
const Triple & getTargetTriple() const
Access Triple.
const std::optional< CodeModel::Model > & getCodeModel() const
Get 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 & setCodeModel(std::optional< CodeModel::Model > CM)
Set the code model.
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.
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
Level
Code generation optimization level.
JITTargetMachineBuilderPrinter(JITTargetMachineBuilder &JTMB, StringRef Indent)
const std::string & getCPU() const
Returns the CPU string.
JITTargetMachineBuilder & setOptions(TargetOptions Options)
Set TargetOptions.
void print(raw_ostream &OS) const