32 TT.setTriple(M->getTargetTriple());
43 Triple TheTriple(TargetTriple);
48 const Target *TheTarget =
nullptr;
51 [&](
const Target &
T) {
return MArch ==
T.getName(); });
55 *ErrorStr =
"No available targets are compatible with this -march, "
56 "see -version for the available targets.\n";
78 std::string FeaturesStr;
79 if (!MAttrs.
empty()) {
81 for (
unsigned i = 0; i != MAttrs.
size(); ++i)
89 Options, RelocModel, CMModel, OptLevel,
91 Target->Options.EmulatedTLS = EmulatedTLS;
Module.h This file contains the declarations for the Module class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
TargetMachine * selectTarget()
Lightweight error class with error context and mandatory checking.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
Manages the enabling and disabling of subtarget specific features.
std::string getString() const
Returns features as a string.
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
Primary interface to the complete machine description for the target machine.
Target - Wrapper for Target specific information.
TargetMachine * createTargetMachine(StringRef TT, StringRef CPU, StringRef Features, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM=std::nullopt, CodeGenOptLevel OL=CodeGenOptLevel::Default, bool JIT=false) const
createTargetMachine - Create a target specific machine implementation for the specified Triple.
Triple - Helper class for working with autoconf configuration names.
void setTriple(const Twine &Str)
Set all components to the new triple Str.
static ArchType getArchTypeForLLVMName(StringRef Str)
The canonical type for the given LLVM architecture name (e.g., "x86").
const std::string & getTriple() const
void setArch(ArchType Kind, SubArchType SubArch=NoSubArch)
Set the architecture (first) component of the triple to a known type.
The instances of the Type class are immutable: once they are created, they are never changed.
std::string getProcessTriple()
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the cu...
This is an optimization pass for GlobalISel generic memory operations.
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
static const Target * lookupTarget(StringRef Triple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
static iterator_range< iterator > targets()