44 Triple TheTriple(TargetTriple);
49 const Target *TheTarget =
nullptr;
56 *ErrorStr =
"No available targets are compatible with this -march, " 57 "see -version for the available targets.\n";
79 std::string FeaturesStr;
80 if (!MAttrs.
empty()) {
82 for (
unsigned i = 0; i != MAttrs.
size(); ++i)
97 Options, RelocModel, CMModel, OptLevel,
102 assert(Target &&
"Could not allocate target machine!");
This class represents lattice values for constants.
TargetMachine * createTargetMachine(StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM=None, CodeGenOpt::Level OL=CodeGenOpt::Default, bool JIT=false) const
createTargetMachine - Create a target specific machine implementation for the specified Triple...
std::string getString() const
Returns features as a string.
const FeatureBitset Features
static const Target * lookupTarget(const std::string &Triple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
const char * getName() const
getName - Get the target name.
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
bool isiOS() const
Is this an iOS triple.
static iterator_range< iterator > targets()
unsigned ExplicitEmulatedTLS
Whether -emulated-tls or -no-emulated-tls is set.
The instances of the Type class are immutable: once they are created, they are never changed...
void setTriple(const Twine &Str)
setTriple - Set all components to the new triple Str.
auto find_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
std::string getProcessTriple()
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the cu...
Triple - Helper class for working with autoconf configuration names.
Module.h This file contains the declarations for the Module class.
static ArchType getArchTypeForLLVMName(StringRef Str)
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
Target - Wrapper for Target specific information.
Manages the enabling and disabling of subtarget specific features.
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library...
const std::string & getTriple() const
LLVM_NODISCARD bool empty() const
TargetMachine * selectTarget()
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
void setArch(ArchType Kind)
setArch - Set the architecture (first) component of the triple to a known type.