13#ifndef LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H
14#define LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H
70 return TM.takeError();
71 return (*TM)->createDataLayout();
76 this->CPU = std::move(CPU);
81 const std::string &
getCPU()
const {
return CPU; }
85 this->RM = std::move(RM);
94 this->CM = std::move(CM);
99 const std::optional<CodeModel::Model> &
getCodeModel()
const {
return CM; }
103 this->OptLevel = OptLevel;
115 addFeatures(
const std::vector<std::string> &FeatureVec);
130 this->Options = std::move(
Options);
151 std::optional<Reloc::Model> RM;
152 std::optional<CodeModel::Model> CM;
161 : JTMB(JTMB), Indent(Indent) {}
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
Manages the enabling and disabling of subtarget specific features.
Triple - Helper class for working with autoconf configuration names.
JITTargetMachineBuilderPrinter(JITTargetMachineBuilder &JTMB, StringRef Indent)
void print(raw_ostream &OS) const
friend raw_ostream & operator<<(raw_ostream &OS, const JITTargetMachineBuilderPrinter &JTMBP)
A utility class for building TargetMachines for JITs.
JITTargetMachineBuilder & setCodeGenOptLevel(CodeGenOptLevel OptLevel)
Set the LLVM CodeGen optimization level.
const std::string & getCPU() const
Returns the CPU string.
const std::optional< Reloc::Model > & getRelocationModel() const
Get the relocation model.
TargetOptions & getOptions()
Access TargetOptions.
const std::optional< CodeModel::Model > & getCodeModel() const
Get the code model.
JITTargetMachineBuilder & addFeatures(const std::vector< std::string > &FeatureVec)
Add subtarget features.
SubtargetFeatures & getFeatures()
Access subtarget features.
Triple & getTargetTriple()
Access Triple.
JITTargetMachineBuilder & setOptions(TargetOptions Options)
Set TargetOptions.
const Triple & getTargetTriple() const
Access Triple.
JITTargetMachineBuilder & setRelocationModel(std::optional< Reloc::Model > RM)
Set the relocation model.
const TargetOptions & getOptions() const
Access TargetOptions.
static Expected< JITTargetMachineBuilder > detectHost()
Create a JITTargetMachineBuilder for the host system.
JITTargetMachineBuilder & setCodeModel(std::optional< CodeModel::Model > CM)
Set the code model.
Expected< DataLayout > getDefaultDataLayoutForTarget()
Get the default DataLayout for the target.
JITTargetMachineBuilder & setFeatures(StringRef FeatureString)
Set subtarget features.
const SubtargetFeatures & getFeatures() const
Access subtarget features.
Expected< std::unique_ptr< TargetMachine > > createTargetMachine()
Create a TargetMachine.
JITTargetMachineBuilder & setCPU(std::string CPU)
Set the CPU string.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
CodeGenOptLevel
Code generation optimization level.