13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_HEXAGON_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_HEXAGON_H
18#include "llvm/Support/Compiler.h"
19#include "llvm/TargetParser/Triple.h"
28 static const char *
const GCCRegNames[];
31 std::string HVXVersion;
33 bool HasHVX64B =
false;
34 bool HasHVX128B =
false;
35 bool HasAudio =
false;
36 bool UseLongCalls =
false;
94 bool hasBFloat16Type()
const override;
99 const std::vector<std::string> &FeaturesVec)
const override;
101 bool handleTargetFeatures(std::vector<std::string> &Features,
116 static const char *getHexagonCPUSuffix(StringRef Name);
117 static std::optional<unsigned> getHexagonCPURev(StringRef Name);
125 bool setCPU(
const std::string &Name)
override {
133 return RegNo < 2 ? RegNo : -1;
138 return CPU.find(
't') != std::string::npos;
147 unsigned CacheLineSizeBytes = Rev >= 73U ? 64 : 32;
148 return std::make_pair(CacheLineSizeBytes, CacheLineSizeBytes);
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.
Defines the clang::TargetOptions class.
Concrete class used by the front-end to report problems and issues.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
TargetInfo(const llvm::Triple &T)
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
@ CharPtrBuiltinVaList
typedef char* __builtin_va_list;
unsigned char MaxAtomicPromoteWidth
void resetDataLayout(StringRef DL)
Set the data layout to the given string.
unsigned char MaxAtomicInlineWidth
Options for controlling the target.
static std::optional< unsigned > getHexagonCPURev(StringRef Name)
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
std::pair< unsigned, unsigned > hardwareInterferenceSizes() const override
The first value in the pair is the minimum offset between two objects to avoid false sharing (destruc...
static const char * getHexagonCPUSuffix(StringRef Name)
HexagonTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
bool setCPU(const std::string &Name) override
Target the specified CPU.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool isCLZForZeroUndef() const override
The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for ...
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.
unsigned char LargeArrayAlign
unsigned ZeroLengthBitfieldBoundary
If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield,...
unsigned UseBitFieldTypeAlignment
Control whether the alignment of bit-field types is respected when laying out structures.
unsigned char LargeArrayMinWidth
unsigned char BFloat16Width
unsigned char BFloat16Align
const llvm::fltSemantics * BFloat16Format