clang 19.0.0git
Public Member Functions | Protected Types | Protected Attributes | List of all members
clang::targets::X86TargetInfo Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Basic/Targets/X86.h"

Inheritance diagram for clang::targets::X86TargetInfo:
Inheritance graph
[legend]

Public Member Functions

 X86TargetInfo (const llvm::Triple &Triple, const TargetOptions &)
 
const char * getLongDoubleMangling () const override
 Return the mangled code of long double.
 
LangOptions::FPEvalMethodKind getFPEvalMethod () const override
 Return the value for the C99 FLT_EVAL_METHOD macro.
 
bool supportSourceEvalMethod () const override
 
ArrayRef< const char * > getGCCRegNames () const override
 
ArrayRef< TargetInfo::GCCRegAliasgetGCCRegAliases () const override
 
ArrayRef< TargetInfo::AddlRegNamegetGCCAddlRegNames () const override
 
bool isSPRegName (StringRef RegName) const override
 
bool supportsCpuSupports () const override
 
bool supportsCpuIs () const override
 
bool supportsCpuInit () const override
 
bool validateCpuSupports (StringRef FeatureStr) const override
 
bool validateCpuIs (StringRef FeatureStr) const override
 
bool validateCPUSpecificCPUDispatch (StringRef Name) const override
 
char CPUSpecificManglingCharacter (StringRef Name) const override
 
void getCPUSpecificCPUDispatchFeatures (StringRef Name, llvm::SmallVectorImpl< StringRef > &Features) const override
 
std::optional< unsignedgetCPUCacheLineSize () const override
 
bool validateAsmConstraint (const char *&Name, TargetInfo::ConstraintInfo &info) const override
 
bool validateGlobalRegisterVariable (StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override
 Validate register name used for global register variables.
 
bool validateOutputSize (const llvm::StringMap< bool > &FeatureMap, StringRef Constraint, unsigned Size) const override
 
bool validateInputSize (const llvm::StringMap< bool > &FeatureMap, StringRef Constraint, unsigned Size) const override
 
bool checkCFProtectionReturnSupported (DiagnosticsEngine &Diags) const override
 Check if the target supports CFProtection return.
 
bool checkCFProtectionBranchSupported (DiagnosticsEngine &Diags) const override
 Check if the target supports CFProtection branch.
 
virtual bool validateOperandSize (const llvm::StringMap< bool > &FeatureMap, StringRef Constraint, unsigned Size) const
 
std::string convertConstraint (const char *&Constraint) const override
 
std::string_view getClobbers () const override
 Returns a string of target-specific clobbers, in LLVM format.
 
StringRef getConstraintRegister (StringRef Constraint, StringRef Expression) const override
 Extracts a register from the passed constraint (if it is a single-register constraint) and the asm label expression related to a variable in the input or output list of an inline asm statement.
 
bool useFP16ConversionIntrinsics () const override
 Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.
 
void getTargetDefines (const LangOptions &Opts, MacroBuilder &Builder) const override
 X86TargetInfo::getTargetDefines - Return the set of the X86-specific macro definitions for this particular subtarget.
 
void setFeatureEnabled (llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const final
 Enable or disable a specific target feature; the feature name must be valid.
 
bool initFeatureMap (llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeaturesVec) const override
 Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.
 
bool isValidFeatureName (StringRef Name) const override
 Determine whether this TargetInfo supports the given feature.
 
bool hasFeature (StringRef Feature) const final
 Determine whether the given target has the given feature.
 
bool handleTargetFeatures (std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
 handleTargetFeatures - Perform initialization based on the user configured set of features.
 
StringRef getABI () const override
 Get the ABI currently in use.
 
bool supportsTargetAttributeTune () const override
 Determine whether this TargetInfo supports tune in target attribute.
 
bool isValidCPUName (StringRef Name) const override
 Determine whether this TargetInfo supports the given CPU name.
 
bool isValidTuneCPUName (StringRef Name) const override
 Determine whether this TargetInfo supports the given CPU name for tuning.
 
void fillValidCPUList (SmallVectorImpl< StringRef > &Values) const override
 Fill a SmallVectorImpl with the valid values to setCPU.
 
void fillValidTuneCPUList (SmallVectorImpl< StringRef > &Values) const override
 Fill a SmallVectorImpl with the valid values for tuning CPU.
 
bool setCPU (const std::string &Name) override
 Target the specified CPU.
 
unsigned multiVersionSortPriority (StringRef Name) const override
 
bool setFPMath (StringRef Name) override
 Use the specified unit for FP math.
 
bool supportsExtendIntArgs () const override
 Whether the option -fextend-arguments={32,64} is supported on the target.
 
CallingConvCheckResult checkCallingConvention (CallingConv CC) const override
 Determines whether a given calling convention is valid for the target.
 
bool checkArithmeticFenceSupported () const override
 Controls if __arithmetic_fence is supported in the targeted backend.
 
CallingConv getDefaultCallingConv () const override
 Gets the default calling convention for the given target and declaration context.
 
bool hasSjLjLowering () const override
 Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
 
void setSupportedOpenCLOpts () override
 Set supported OpenCL extensions and optional core features.
 
uint64_t getPointerWidthV (LangAS AS) const override
 
uint64_t getPointerAlignV (LangAS AddrSpace) const override
 
- Public Member Functions inherited from clang::TargetInfo
virtual ~TargetInfo ()
 
TargetOptionsgetTargetOpts () const
 Retrieve the target options.
 
IntType getSizeType () const
 
IntType getSignedSizeType () const
 
IntType getIntMaxType () const
 
IntType getUIntMaxType () const
 
IntType getPtrDiffType (LangAS AddrSpace) const
 
IntType getUnsignedPtrDiffType (LangAS AddrSpace) const
 
IntType getIntPtrType () const
 
IntType getUIntPtrType () const
 
IntType getWCharType () const
 
IntType getWIntType () const
 
IntType getChar16Type () const
 
IntType getChar32Type () const
 
IntType getInt64Type () const
 
IntType getUInt64Type () const
 
IntType getInt16Type () const
 
IntType getUInt16Type () const
 
IntType getSigAtomicType () const
 
IntType getProcessIDType () const
 
bool doUnsignedFixedPointTypesHavePadding () const
 In the event this target uses the same number of fractional bits for its unsigned types as it does with its signed counterparts, there will be exactly one bit of padding.
 
unsigned getTypeWidth (IntType T) const
 Return the width (in bits) of the specified integer type enum.
 
virtual IntType getIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return integer type with specified width.
 
virtual IntType getLeastIntTypeByWidth (unsigned BitWidth, bool IsSigned) const
 Return the smallest integer type with at least the specified width.
 
FloatModeKind getRealTypeByWidth (unsigned BitWidth, FloatModeKind ExplicitType) const
 Return floating point type with specified width.
 
unsigned getTypeAlign (IntType T) const
 Return the alignment (in bits) of the specified integer type enum.
 
uint64_t getPointerWidth (LangAS AddrSpace) const
 Return the width of pointers on this target, for the specified address space.
 
uint64_t getPointerAlign (LangAS AddrSpace) const
 
virtual uint64_t getMaxPointerWidth () const
 Return the maximum width of pointers on this target.
 
virtual uint64_t getNullPointerValue (LangAS AddrSpace) const
 Get integer value for null pointer.
 
unsigned getBoolWidth () const
 Return the size of '_Bool' and C++ 'bool' for this target, in bits.
 
unsigned getBoolAlign () const
 Return the alignment of '_Bool' and C++ 'bool' for this target.
 
unsigned getCharWidth () const
 
unsigned getCharAlign () const
 
unsigned getShortWidth () const
 Return the size of 'signed short' and 'unsigned short' for this target, in bits.
 
unsigned getShortAlign () const
 Return the alignment of 'signed short' and 'unsigned short' for this target.
 
unsigned getIntWidth () const
 getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target, in bits.
 
unsigned getIntAlign () const
 
unsigned getLongWidth () const
 getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target, in bits.
 
unsigned getLongAlign () const
 
unsigned getLongLongWidth () const
 getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this target, in bits.
 
unsigned getLongLongAlign () const
 
unsigned getInt128Align () const
 getInt128Align() - Returns the alignment of Int128.
 
unsigned getShortAccumWidth () const
 getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for this target, in bits.
 
unsigned getShortAccumAlign () const
 
unsigned getAccumWidth () const
 getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target, in bits.
 
unsigned getAccumAlign () const
 
unsigned getLongAccumWidth () const
 getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this target, in bits.
 
unsigned getLongAccumAlign () const
 
unsigned getShortFractWidth () const
 getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for this target, in bits.
 
unsigned getShortFractAlign () const
 
unsigned getFractWidth () const
 getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target, in bits.
 
unsigned getFractAlign () const
 
unsigned getLongFractWidth () const
 getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this target, in bits.
 
unsigned getLongFractAlign () const
 
unsigned getShortAccumScale () const
 getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' type.
 
unsigned getShortAccumIBits () const
 
unsigned getAccumScale () const
 getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.
 
unsigned getAccumIBits () const
 
unsigned getLongAccumScale () const
 getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' type.
 
unsigned getLongAccumIBits () const
 
unsigned getUnsignedShortAccumScale () const
 getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short _Accum' type.
 
unsigned getUnsignedShortAccumIBits () const
 
unsigned getUnsignedAccumScale () const
 getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' type.
 
unsigned getUnsignedAccumIBits () const
 
unsigned getUnsignedLongAccumScale () const
 getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _Accum' type.
 
unsigned getUnsignedLongAccumIBits () const
 
unsigned getShortFractScale () const
 getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
 
unsigned getFractScale () const
 getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
 
unsigned getLongFractScale () const
 getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
 
unsigned getUnsignedShortFractScale () const
 getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
 
unsigned getUnsignedFractScale () const
 getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
 
unsigned getUnsignedLongFractScale () const
 getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
 
virtual bool hasInt128Type () const
 Determine whether the __int128 type is supported on this target.
 
virtual bool hasBitIntType () const
 Determine whether the _BitInt type is supported on this target.
 
virtual size_t getMaxBitIntWidth () const
 
virtual bool hasLegalHalfType () const
 Determine whether _Float16 is supported on this target.
 
virtual bool allowHalfArgsAndReturns () const
 Whether half args and returns are supported.
 
virtual bool hasFloat128Type () const
 Determine whether the __float128 type is supported on this target.
 
virtual bool hasFloat16Type () const
 Determine whether the _Float16 type is supported on this target.
 
virtual bool hasBFloat16Type () const
 Determine whether the _BFloat16 type is supported on this target.
 
virtual bool hasFullBFloat16Type () const
 Determine whether the BFloat type is fully supported on this target, i.e arithemtic operations.
 
virtual bool hasIbm128Type () const
 Determine whether the __ibm128 type is supported on this target.
 
virtual bool hasLongDoubleType () const
 Determine whether the long double type is supported on this target.
 
virtual bool hasFPReturn () const
 Determine whether return of a floating point value is supported on this target.
 
virtual bool hasStrictFP () const
 Determine whether constrained floating point is supported on this target.
 
unsigned getSuitableAlign () const
 Return the alignment that is the largest alignment ever used for any scalar/SIMD data type on the target machine you are compiling for (including types with an extended alignment requirement).
 
unsigned getDefaultAlignForAttributeAligned () const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.
 
virtual unsigned getMinGlobalAlign (uint64_t Size, bool HasNonWeakDef) const
 getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explicitly reduced via attributes.
 
unsigned getNewAlign () const
 Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is guaranteed to produce a correctly-aligned pointer.
 
unsigned getWCharWidth () const
 getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.
 
unsigned getWCharAlign () const
 
unsigned getChar16Width () const
 getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.
 
unsigned getChar16Align () const
 
unsigned getChar32Width () const
 getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.
 
unsigned getChar32Align () const
 
unsigned getHalfWidth () const
 getHalfWidth/Align/Format - Return the size/align/format of 'half'.
 
unsigned getHalfAlign () const
 
const llvm::fltSemantics & getHalfFormat () const
 
unsigned getFloatWidth () const
 getFloatWidth/Align/Format - Return the size/align/format of 'float'.
 
unsigned getFloatAlign () const
 
const llvm::fltSemantics & getFloatFormat () const
 
unsigned getBFloat16Width () const
 getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
 
unsigned getBFloat16Align () const
 
const llvm::fltSemantics & getBFloat16Format () const
 
unsigned getDoubleWidth () const
 getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
 
unsigned getDoubleAlign () const
 
const llvm::fltSemantics & getDoubleFormat () const
 
unsigned getLongDoubleWidth () const
 getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.
 
unsigned getLongDoubleAlign () const
 
const llvm::fltSemantics & getLongDoubleFormat () const
 
unsigned getFloat128Width () const
 getFloat128Width/Align/Format - Return the size/align/format of '__float128'.
 
unsigned getFloat128Align () const
 
const llvm::fltSemantics & getFloat128Format () const
 
unsigned getIbm128Width () const
 getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.
 
unsigned getIbm128Align () const
 
const llvm::fltSemantics & getIbm128Format () const
 
virtual const char * getLongDoubleMangling () const
 Return the mangled code of long double.
 
virtual const char * getFloat128Mangling () const
 Return the mangled code of __float128.
 
virtual const char * getIbm128Mangling () const
 Return the mangled code of __ibm128.
 
virtual const char * getBFloat16Mangling () const
 Return the mangled code of bfloat.
 
virtual LangOptions::FPEvalMethodKind getFPEvalMethod () const
 Return the value for the C99 FLT_EVAL_METHOD macro.
 
virtual bool supportSourceEvalMethod () const
 
unsigned getLargeArrayMinWidth () const
 
unsigned getLargeArrayAlign () const
 
unsigned getMaxAtomicPromoteWidth () const
 Return the maximum width lock-free atomic operation which will ever be supported for the given target.
 
unsigned getMaxAtomicInlineWidth () const
 Return the maximum width lock-free atomic operation which can be inlined given the supported features of the given target.
 
virtual void setMaxAtomicWidth ()
 Set the maximum inline or promote width lock-free atomic operation for the given target.
 
virtual bool hasBuiltinAtomic (uint64_t AtomicSizeInBits, uint64_t AlignmentInBits) const
 Returns true if the given target supports lock-free atomic operations at the specified width and alignment.
 
unsigned getMaxVectorAlign () const
 Return the maximum vector alignment supported for the given target.
 
unsigned getMaxOpenCLWorkGroupSize () const
 
virtual unsigned getExnObjectAlignment () const
 Return the alignment (in bits) of the thrown exception object.
 
unsigned getIntMaxTWidth () const
 Return the size of intmax_t and uintmax_t for this target, in bits.
 
virtual unsigned getUnwindWordWidth () const
 
virtual unsigned getRegisterWidth () const
 Return the "preferred" register width on this target.
 
const char * getUserLabelPrefix () const
 Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols by default.
 
const char * getMCountName () const
 Returns the name of the mcount instrumentation function.
 
bool useSignedCharForObjCBool () const
 Check if the Objective-C built-in boolean type should be signed char.
 
void noSignedCharForObjCBool ()
 
bool useBitFieldTypeAlignment () const
 Check whether the alignment of bit-field types is respected when laying out structures.
 
bool useZeroLengthBitfieldAlignment () const
 Check whether zero length bitfields should force alignment of the next member.
 
bool useLeadingZeroLengthBitfield () const
 Check whether zero length bitfield alignment is respected if they are leading members.
 
unsigned getZeroLengthBitfieldBoundary () const
 Get the fixed alignment value in bits for a member that follows a zero length bitfield.
 
unsigned getMaxAlignedAttribute () const
 Get the maximum alignment in bits for a static variable with aligned attribute.
 
bool useExplicitBitFieldAlignment () const
 Check whether explicit bitfield alignment attributes should be.
 
bool hasAlignMac68kSupport () const
 Check whether this target support '#pragma options align=mac68k'.
 
const char * getTypeConstantSuffix (IntType T) const
 Return the constant suffix for the specified integer type enum.
 
bool useObjCFPRetForRealType (FloatModeKind T) const
 Check whether the given real type should use the "fpret" flavor of Objective-C message passing on this target.
 
bool useObjCFP2RetForComplexLongDouble () const
 Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on this target.
 
virtual bool useFP16ConversionIntrinsics () const
 Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.
 
bool useAddressSpaceMapMangling () const
 Specify if mangling based on address space map should be used or not for language specific address spaces.
 
virtual void getTargetDefines (const LangOptions &Opts, MacroBuilder &Builder) const =0
 ===-— Other target property query methods -----------------------—===//
 
virtual ArrayRef< Builtin::InfogetTargetBuiltins () const =0
 Return information about target-specific builtins for the current primary target, and info about which builtins are non-portable across the current set of primary and secondary targets.
 
virtual std::optional< std::pair< unsigned, unsigned > > getVScaleRange (const LangOptions &LangOpts) const
 Returns target-specific min and max values VScale_Range.
 
virtual bool isCLZForZeroUndef () const
 The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for zero inputs, but on targets that support these operations in a way that provides well-defined results for zero without loss of performance, it is a good idea to avoid optimizing based on that undef behavior.
 
virtual BuiltinVaListKind getBuiltinVaListKind () const =0
 Returns the kind of __builtin_va_list type that should be used with this target.
 
bool hasBuiltinMSVaList () const
 Returns whether or not type __builtin_ms_va_list type is available on this target.
 
bool isRenderScriptTarget () const
 Returns true for RenderScript.
 
bool hasAArch64SVETypes () const
 Returns whether or not the AArch64 SVE built-in types are available on this target.
 
bool hasRISCVVTypes () const
 Returns whether or not the RISC-V V built-in types are available on this target.
 
bool allowAMDGPUUnsafeFPAtomics () const
 Returns whether or not the AMDGPU unsafe floating point atomics are allowed.
 
uint32_t getARMCDECoprocMask () const
 For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.
 
bool isValidClobber (StringRef Name) const
 Returns whether the passed in string is a valid clobber in an inline asm statement.
 
virtual bool isValidGCCRegisterName (StringRef Name) const
 Returns whether the passed in string is a valid register name according to GCC.
 
StringRef getNormalizedGCCRegisterName (StringRef Name, bool ReturnCanonical=false) const
 Returns the "normalized" GCC register name.
 
virtual bool isSPRegName (StringRef) const
 
virtual StringRef getConstraintRegister (StringRef Constraint, StringRef Expression) const
 Extracts a register from the passed constraint (if it is a single-register constraint) and the asm label expression related to a variable in the input or output list of an inline asm statement.
 
virtual bool validateGlobalRegisterVariable (StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const
 Validate register name used for global register variables.
 
bool validateOutputConstraint (ConstraintInfo &Info) const
 
bool validateInputConstraint (MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
 
virtual bool validateOutputSize (const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
 
virtual bool validateInputSize (const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
 
virtual bool validateConstraintModifier (StringRef, char, unsigned, std::string &) const
 
virtual bool validateAsmConstraint (const char *&Name, TargetInfo::ConstraintInfo &info) const =0
 
bool resolveSymbolicName (const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
 
virtual std::string convertConstraint (const char *&Constraint) const
 
virtual std::optional< std::string > handleAsmEscapedChar (char C) const
 Replace some escaped characters with another string based on target-specific rules.
 
virtual std::string_view getClobbers () const =0
 Returns a string of target-specific clobbers, in LLVM format.
 
virtual bool isNan2008 () const
 Returns true if NaN encoding is IEEE 754-2008.
 
const llvm::Triple & getTriple () const
 Returns the target triple of the primary target.
 
virtual std::optional< std::string > getTargetID () const
 Returns the target ID if supported.
 
const char * getDataLayoutString () const
 
virtual bool hasProtectedVisibility () const
 Does this target support "protected" visibility?
 
virtual bool shouldDLLImportComdatSymbols () const
 Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attributes?
 
virtual bool hasPS4DLLImportExport () const
 
virtual void adjust (DiagnosticsEngine &Diags, LangOptions &Opts)
 Set forced language options.
 
virtual bool initFeatureMap (llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
 Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.
 
virtual StringRef getABI () const
 Get the ABI currently in use.
 
TargetCXXABI getCXXABI () const
 Get the C++ ABI currently in use.
 
virtual bool setCPU (const std::string &Name)
 Target the specified CPU.
 
virtual void fillValidCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values to setCPU.
 
virtual void fillValidTuneCPUList (SmallVectorImpl< StringRef > &Values) const
 Fill a SmallVectorImpl with the valid values for tuning CPU.
 
virtual bool isValidCPUName (StringRef Name) const
 Determine whether this TargetInfo supports the given CPU name.
 
virtual bool isValidTuneCPUName (StringRef Name) const
 Determine whether this TargetInfo supports the given CPU name for tuning.
 
virtual ParsedTargetAttr parseTargetAttr (StringRef Str) const
 
virtual bool supportsTargetAttributeTune () const
 Determine whether this TargetInfo supports tune in target attribute.
 
virtual bool setABI (const std::string &Name)
 Use the specified ABI.
 
virtual bool setFPMath (StringRef Name)
 Use the specified unit for FP math.
 
virtual bool hasFeatureEnabled (const llvm::StringMap< bool > &Features, StringRef Name) const
 Check if target has a given feature enabled.
 
virtual void setFeatureEnabled (llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
 Enable or disable a specific target feature; the feature name must be valid.
 
virtual bool isValidFeatureName (StringRef Feature) const
 Determine whether this TargetInfo supports the given feature.
 
virtual bool doesFeatureAffectCodeGen (StringRef Feature) const
 Returns true if feature has an impact on target code generation.
 
virtual StringRef getFeatureDependencies (StringRef Feature) const
 For given feature return dependent ones.
 
virtual bool isBranchProtectionSupportedArch (StringRef Arch) const
 Determine if the Architecture in this TargetInfo supports branch protection.
 
virtual bool validateBranchProtection (StringRef Spec, StringRef Arch, BranchProtectionInfo &BPI, StringRef &Err) const
 Determine if this TargetInfo supports the given branch protection specification.
 
virtual bool handleTargetFeatures (std::vector< std::string > &Features, DiagnosticsEngine &Diags)
 Perform initialization based on the user configured set of features (e.g., +sse4).
 
virtual bool hasFeature (StringRef Feature) const
 Determine whether the given target has the given feature.
 
bool isReadOnlyFeature (StringRef Feature) const
 Determine whether the given target feature is read only.
 
bool supportsMultiVersioning () const
 Identify whether this target supports multiversioning of functions, which requires support for cpu_supports and cpu_is functionality.
 
bool supportsIFunc () const
 Identify whether this target supports IFuncs.
 
virtual bool supportsCpuSupports () const
 
virtual bool supportsCpuIs () const
 
virtual bool supportsCpuInit () const
 
virtual bool validateCpuSupports (StringRef Name) const
 
virtual unsigned multiVersionSortPriority (StringRef Name) const
 
virtual unsigned multiVersionFeatureCost () const
 
virtual bool validateCpuIs (StringRef Name) const
 
virtual bool validateCPUSpecificCPUDispatch (StringRef Name) const
 
virtual char CPUSpecificManglingCharacter (StringRef Name) const
 
virtual StringRef getCPUSpecificTuneName (StringRef Name) const
 
virtual void getCPUSpecificCPUDispatchFeatures (StringRef Name, llvm::SmallVectorImpl< StringRef > &Features) const
 
virtual std::optional< unsignedgetCPUCacheLineSize () const
 
unsigned getRegParmMax () const
 
bool isTLSSupported () const
 Whether the target supports thread-local storage.
 
unsigned getMaxTLSAlign () const
 Return the maximum alignment (in bits) of a TLS variable.
 
bool isVLASupported () const
 Whether target supports variable-length arrays.
 
bool isSEHTrySupported () const
 Whether the target supports SEH __try.
 
bool hasNoAsmVariants () const
 Return true if {|} are normal characters in the asm string.
 
virtual int getEHDataRegisterNumber (unsigned RegNo) const
 Return the register number that __builtin_eh_return_regno would return with the specified argument.
 
virtual const char * getStaticInitSectionSpecifier () const
 Return the section to use for C++ static initialization functions.
 
const LangASMapgetAddressSpaceMap () const
 
unsigned getTargetAddressSpace (LangAS AS) const
 
virtual bool validatePointerAuthKey (const llvm::APSInt &value) const
 Determine whether the given pointer-authentication key is valid.
 
virtual LangAS getOpenCLBuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space.
 
virtual LangAS getCUDABuiltinAddressSpace (unsigned AS) const
 Map from the address space field in builtin description strings to the language address space.
 
virtual std::optional< LangASgetConstantAddressSpace () const
 Return an AST address space which can be used opportunistically for constant global memory.
 
virtual const llvm::omp::GV & getGridValue () const
 
StringRef getPlatformName () const
 Retrieve the name of the platform as it is used in the availability attribute.
 
VersionTuple getPlatformMinVersion () const
 Retrieve the minimum desired version of the platform, to which the program should be compiled.
 
bool isBigEndian () const
 
bool isLittleEndian () const
 
virtual bool supportsExtendIntArgs () const
 Whether the option -fextend-arguments={32,64} is supported on the target.
 
virtual bool checkArithmeticFenceSupported () const
 Controls if __arithmetic_fence is supported in the targeted backend.
 
virtual CallingConv getDefaultCallingConv () const
 Gets the default calling convention for the given target and declaration context.
 
virtual CallingConvCheckResult checkCallingConvention (CallingConv CC) const
 Determines whether a given calling convention is valid for the target.
 
virtual CallingConvKind getCallingConvKind (bool ClangABICompat4) const
 
virtual bool areDefaultedSMFStillPOD (const LangOptions &) const
 Controls whether explicitly defaulted (= default) special member functions disqualify something from being POD-for-the-purposes-of-layout.
 
virtual bool hasSjLjLowering () const
 Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
 
virtual bool checkCFProtectionBranchSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection branch.
 
virtual bool checkCFProtectionReturnSupported (DiagnosticsEngine &Diags) const
 Check if the target supports CFProtection return.
 
virtual bool allowsLargerPreferedTypeAlignment () const
 Whether target allows to overalign ABI-specified preferred alignment.
 
virtual bool defaultsToAIXPowerAlignment () const
 Whether target defaults to the power alignment rules of AIX.
 
virtual void setSupportedOpenCLOpts ()
 Set supported OpenCL extensions and optional core features.
 
virtual void supportAllOpenCLOpts (bool V=true)
 
virtual void setCommandLineOpenCLOpts ()
 Set supported OpenCL extensions as written on command line.
 
llvm::StringMap< bool > & getSupportedOpenCLOpts ()
 Get supported OpenCL extensions and optional core features.
 
const llvm::StringMap< bool > & getSupportedOpenCLOpts () const
 Get const supported OpenCL extensions and optional core features.
 
virtual LangAS getOpenCLTypeAddrSpace (OpenCLTypeKind TK) const
 Get address space for OpenCL type.
 
virtual unsigned getVtblPtrAddressSpace () const
 
virtual std::optional< unsignedgetDWARFAddressSpace (unsigned AddressSpace) const
 
const llvm::VersionTuple & getSDKVersion () const
 
virtual bool validateTarget (DiagnosticsEngine &Diags) const
 Check the target is valid after it is fully initialized.
 
virtual bool validateOpenCLTarget (const LangOptions &Opts, DiagnosticsEngine &Diags) const
 Check that OpenCL target has valid options setting based on OpenCL version.
 
virtual void setAuxTarget (const TargetInfo *Aux)
 
virtual bool allowDebugInfoForExternalRef () const
 Whether target allows debuginfo types for decl only variables/functions.
 
const llvm::Triple * getDarwinTargetVariantTriple () const
 Returns the darwin target variant triple, the variant of the deployment target for which the code is being compiled.
 
const std::optional< VersionTuple > getDarwinTargetVariantSDKVersion () const
 Returns the version of the darwin target variant SDK which was used during the compilation if one was specified, or an empty version otherwise.
 
virtual bool hasHIPImageSupport () const
 Whether to support HIP image/texture API's.
 

Protected Types

enum  FPMathKind { FP_Default , FP_SSE , FP_387 }
 

Protected Attributes

llvm::X86::CPUKind CPU = llvm::X86::CK_None
 
enum clang::targets::X86TargetInfo::FPMathKind FPMath = FP_Default
 
- Protected Attributes inherited from clang::TargetInfo
bool BigEndian
 
bool TLSSupported
 
bool VLASupported
 
bool NoAsmVariants
 
bool HasLegalHalfType
 
bool HalfArgsAndReturns
 
bool HasFloat128
 
bool HasFloat16
 
bool HasBFloat16
 
bool HasFullBFloat16
 
bool HasIbm128
 
bool HasLongDouble
 
bool HasFPReturn
 
bool HasStrictFP
 
unsigned char MaxAtomicPromoteWidth
 
unsigned char MaxAtomicInlineWidth
 
std::string DataLayoutString
 
const char * UserLabelPrefix
 
const char * MCountName
 
unsigned char RegParmMax
 
unsigned char SSERegParmMax
 
TargetCXXABI TheCXXABI
 
const LangASMapAddrSpaceMap
 
StringRef PlatformName
 
VersionTuple PlatformMinVersion
 
unsigned HasAlignMac68kSupport: 1
 
unsigned RealTypeUsesObjCFPRetMask: llvm::BitWidth<FloatModeKind>
 
unsigned ComplexLongDoubleUsesFP2Ret: 1
 
unsigned HasBuiltinMSVaList: 1
 
unsigned IsRenderScriptTarget: 1
 
unsigned HasAArch64SVETypes: 1
 
unsigned HasRISCVVTypes: 1
 
unsigned AllowAMDGPUUnsafeFPAtomics: 1
 
unsigned ARMCDECoprocMask: 8
 
unsigned MaxOpenCLWorkGroupSize
 
std::optional< unsignedMaxBitIntWidth
 
std::optional< llvm::Triple > DarwinTargetVariantTriple
 
llvm::StringSet ReadOnlyFeatures
 
bool UseAddrSpaceMapMangling
 Specify if mangling based on address space map should be used or not for language specific address spaces.
 
- Protected Attributes inherited from clang::TransferrableTargetInfo
IntType SizeType
 
IntType IntMaxType
 
IntType PtrDiffType
 
IntType IntPtrType
 
IntType WCharType
 
IntType WIntType
 
IntType Char16Type
 
IntType Char32Type
 
IntType Int64Type
 
IntType Int16Type
 
IntType SigAtomicType
 
IntType ProcessIDType
 
unsigned UseSignedCharForObjCBool: 1
 Whether Objective-C's built-in boolean type should be signed char.
 
unsigned UseBitFieldTypeAlignment: 1
 Control whether the alignment of bit-field types is respected when laying out structures.
 
unsigned UseZeroLengthBitfieldAlignment: 1
 Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
 
unsigned UseLeadingZeroLengthBitfield: 1
 Whether zero length bitfield alignment is respected if they are the leading members.
 
unsigned UseExplicitBitFieldAlignment: 1
 Whether explicit bit field alignment attributes are honored.
 
unsigned ZeroLengthBitfieldBoundary
 If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield, regardless of the zero length bitfield type.
 
unsigned MaxAlignedAttribute
 If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute of a static variable to this value.
 

Additional Inherited Members

- Public Types inherited from clang::TargetInfo
enum  BuiltinVaListKind {
  CharPtrBuiltinVaList = 0 , VoidPtrBuiltinVaList , AArch64ABIBuiltinVaList , PNaClABIBuiltinVaList ,
  PowerABIBuiltinVaList , X86_64ABIBuiltinVaList , AAPCSABIBuiltinVaList , SystemZBuiltinVaList ,
  HexagonBuiltinVaList
}
 The different kinds of __builtin_va_list types defined by the target implementation. More...
 
enum  CallingConvCheckResult { CCCR_OK , CCCR_Warning , CCCR_Ignore , CCCR_Error }
 
enum  CallingConvKind { CCK_Default , CCK_ClangABI4OrPS4 , CCK_MicrosoftWin64 }
 
- Public Types inherited from clang::TransferrableTargetInfo
enum  IntType {
  NoInt = 0 , SignedChar , UnsignedChar , SignedShort ,
  UnsignedShort , SignedInt , UnsignedInt , SignedLong ,
  UnsignedLong , SignedLongLong , UnsignedLongLong
}
 ===-— Target Data Type Query Methods ----------------------------—===// More...
 
- Static Public Member Functions inherited from clang::TargetInfo
static TargetInfoCreateTargetInfo (DiagnosticsEngine &Diags, const std::shared_ptr< TargetOptions > &Opts)
 Construct a target for the given options.
 
static IntType getCorrespondingUnsignedType (IntType T)
 
static bool isTypeSigned (IntType T)
 Returns true if the type is signed; false otherwise.
 
static const char * getTypeName (IntType T)
 Return the user string for the specified integer type enum.
 
static const char * getTypeFormatModifier (IntType T)
 Return the printf format modifier for the specified integer type enum.
 
- Public Attributes inherited from clang::TransferrableTargetInfo
unsigned char PointerWidth
 
unsigned char PointerAlign
 
unsigned char BoolWidth
 
unsigned char BoolAlign
 
unsigned char IntWidth
 
unsigned char IntAlign
 
unsigned char HalfWidth
 
unsigned char HalfAlign
 
unsigned char BFloat16Width
 
unsigned char BFloat16Align
 
unsigned char FloatWidth
 
unsigned char FloatAlign
 
unsigned char DoubleWidth
 
unsigned char DoubleAlign
 
unsigned char LongDoubleWidth
 
unsigned char LongDoubleAlign
 
unsigned char Float128Align
 
unsigned char Ibm128Align
 
unsigned char LargeArrayMinWidth
 
unsigned char LargeArrayAlign
 
unsigned char LongWidth
 
unsigned char LongAlign
 
unsigned char LongLongWidth
 
unsigned char LongLongAlign
 
unsigned char Int128Align
 
unsigned char ShortAccumWidth
 
unsigned char ShortAccumAlign
 
unsigned char AccumWidth
 
unsigned char AccumAlign
 
unsigned char LongAccumWidth
 
unsigned char LongAccumAlign
 
unsigned char ShortFractWidth
 
unsigned char ShortFractAlign
 
unsigned char FractWidth
 
unsigned char FractAlign
 
unsigned char LongFractWidth
 
unsigned char LongFractAlign
 
bool PaddingOnUnsignedFixedPoint
 
unsigned char ShortAccumScale
 
unsigned char AccumScale
 
unsigned char LongAccumScale
 
unsigned char DefaultAlignForAttributeAligned
 
unsigned char MinGlobalAlign
 
unsigned short SuitableAlign
 
unsigned short NewAlign
 
unsigned MaxVectorAlign
 
unsigned MaxTLSAlign
 
const llvm::fltSemantics * HalfFormat
 
const llvm::fltSemantics * BFloat16Format
 
const llvm::fltSemantics * FloatFormat
 
const llvm::fltSemantics * DoubleFormat
 
const llvm::fltSemantics * LongDoubleFormat
 
const llvm::fltSemantics * Float128Format
 
const llvm::fltSemantics * Ibm128Format
 
- Protected Member Functions inherited from clang::TargetInfo
 TargetInfo (const llvm::Triple &T)
 
void resetDataLayout (StringRef DL, const char *UserLabelPrefix="")
 
void copyAuxTarget (const TargetInfo *Aux)
 Copy type and layout related info.
 
virtual uint64_t getPointerWidthV (LangAS AddrSpace) const
 
virtual uint64_t getPointerAlignV (LangAS AddrSpace) const
 
virtual enum IntType getPtrDiffTypeV (LangAS AddrSpace) const
 
virtual ArrayRef< const char * > getGCCRegNames () const =0
 
virtual ArrayRef< GCCRegAliasgetGCCRegAliases () const =0
 
virtual ArrayRef< AddlRegNamegetGCCAddlRegNames () const
 

Detailed Description

Definition at line 56 of file X86.h.

Member Enumeration Documentation

◆ FPMathKind

Enumerator
FP_Default 
FP_SSE 
FP_387 

Definition at line 181 of file X86.h.

Constructor & Destructor Documentation

◆ X86TargetInfo()

clang::targets::X86TargetInfo::X86TargetInfo ( const llvm::Triple &  Triple,
const TargetOptions  
)
inline

Definition at line 184 of file X86.h.

References getCharWidth(), and clang::targets::X86AddrSpaceMap.

Member Function Documentation

◆ checkArithmeticFenceSupported()

bool clang::targets::X86TargetInfo::checkArithmeticFenceSupported ( ) const
inlineoverridevirtual

Controls if __arithmetic_fence is supported in the targeted backend.

Reimplemented from clang::TargetInfo.

Definition at line 413 of file X86.h.

◆ checkCallingConvention()

CallingConvCheckResult clang::targets::X86TargetInfo::checkCallingConvention ( CallingConv  CC) const
inlineoverridevirtual

Determines whether a given calling convention is valid for the target.

A calling convention can either be accepted, produce a warning and be substituted with the default calling convention, or (someday) produce an error (such as using thiscall on a non-instance function).

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::MCUX86_32TargetInfo, and clang::targets::X86_64TargetInfo.

Definition at line 391 of file X86.h.

References clang::CC_C, clang::CC_IntelOclBicc, clang::CC_OpenCLKernel, clang::CC_PreserveMost, clang::CC_Swift, clang::CC_SwiftAsync, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86ThisCall, and clang::CC_X86VectorCall.

◆ checkCFProtectionBranchSupported()

bool clang::targets::X86TargetInfo::checkCFProtectionBranchSupported ( DiagnosticsEngine Diags) const
inlineoverridevirtual

Check if the target supports CFProtection branch.

Reimplemented from clang::TargetInfo.

Definition at line 271 of file X86.h.

◆ checkCFProtectionReturnSupported()

bool clang::targets::X86TargetInfo::checkCFProtectionReturnSupported ( DiagnosticsEngine Diags) const
inlineoverridevirtual

Check if the target supports CFProtection return.

Reimplemented from clang::TargetInfo.

Definition at line 264 of file X86.h.

◆ convertConstraint()

std::string X86TargetInfo::convertConstraint ( const char *&  Constraint) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1699 of file X86.cpp.

References matchAsmCCConstraint().

◆ CPUSpecificManglingCharacter()

char X86TargetInfo::CPUSpecificManglingCharacter ( StringRef  Name) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1326 of file X86.cpp.

◆ fillValidCPUList()

void X86TargetInfo::fillValidCPUList ( SmallVectorImpl< StringRef > &  Values) const
overridevirtual

Fill a SmallVectorImpl with the valid values to setCPU.

Reimplemented from clang::TargetInfo.

Definition at line 1753 of file X86.cpp.

References clang::TargetInfo::getTriple().

◆ fillValidTuneCPUList()

void X86TargetInfo::fillValidTuneCPUList ( SmallVectorImpl< StringRef > &  Values) const
overridevirtual

Fill a SmallVectorImpl with the valid values for tuning CPU.

Reimplemented from clang::TargetInfo.

Definition at line 1758 of file X86.cpp.

◆ getABI()

StringRef clang::targets::X86TargetInfo::getABI ( ) const
inlineoverridevirtual

Get the ABI currently in use.

Reimplemented from clang::TargetInfo.

Definition at line 344 of file X86.h.

◆ getClobbers()

std::string_view clang::targets::X86TargetInfo::getClobbers ( ) const
inlineoverridevirtual

Returns a string of target-specific clobbers, in LLVM format.

Implements clang::TargetInfo.

Definition at line 281 of file X86.h.

◆ getConstraintRegister()

StringRef clang::targets::X86TargetInfo::getConstraintRegister ( StringRef  Constraint,
StringRef  Expression 
) const
inlineoverridevirtual

Extracts a register from the passed constraint (if it is a single-register constraint) and the asm label expression related to a variable in the input or output list of an inline asm statement.

This function is used by Sema in order to diagnose conflicts between the clobber list and the input/output lists.

Reimplemented from clang::TargetInfo.

Definition at line 285 of file X86.h.

◆ getCPUCacheLineSize()

std::optional< unsigned > X86TargetInfo::getCPUCacheLineSize ( ) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1509 of file X86.cpp.

References CPU.

◆ getCPUSpecificCPUDispatchFeatures()

void X86TargetInfo::getCPUSpecificCPUDispatchFeatures ( StringRef  Name,
llvm::SmallVectorImpl< StringRef > &  Features 
) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1330 of file X86.cpp.

◆ getDefaultCallingConv()

CallingConv clang::targets::X86TargetInfo::getDefaultCallingConv ( ) const
inlineoverridevirtual

Gets the default calling convention for the given target and declaration context.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::X86_64TargetInfo.

Definition at line 415 of file X86.h.

References clang::CC_C.

◆ getFPEvalMethod()

LangOptions::FPEvalMethodKind clang::targets::X86TargetInfo::getFPEvalMethod ( ) const
inlineoverridevirtual

Return the value for the C99 FLT_EVAL_METHOD macro.

Reimplemented from clang::TargetInfo.

Definition at line 202 of file X86.h.

◆ getGCCAddlRegNames()

ArrayRef< TargetInfo::AddlRegName > X86TargetInfo::getGCCAddlRegNames ( ) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1766 of file X86.cpp.

References clang::targets::AddlRegNames.

◆ getGCCRegAliases()

ArrayRef< TargetInfo::GCCRegAlias > clang::targets::X86TargetInfo::getGCCRegAliases ( ) const
inlineoverridevirtual

Implements clang::TargetInfo.

Definition at line 213 of file X86.h.

◆ getGCCRegNames()

ArrayRef< const char * > X86TargetInfo::getGCCRegNames ( ) const
overridevirtual

Implements clang::TargetInfo.

Definition at line 1762 of file X86.cpp.

References clang::targets::GCCRegNames.

◆ getLongDoubleMangling()

const char * clang::targets::X86TargetInfo::getLongDoubleMangling ( ) const
inlineoverridevirtual

Return the mangled code of long double.

Reimplemented from clang::TargetInfo.

Definition at line 198 of file X86.h.

◆ getPointerAlignV()

uint64_t clang::targets::X86TargetInfo::getPointerAlignV ( LangAS  AddrSpace) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 432 of file X86.h.

◆ getPointerWidthV()

uint64_t clang::targets::X86TargetInfo::getPointerWidthV ( LangAS  AS) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 423 of file X86.h.

References clang::ptr32_sptr, clang::ptr32_uptr, and clang::ptr64.

◆ getTargetDefines()

void X86TargetInfo::getTargetDefines ( const LangOptions Opts,
MacroBuilder Builder 
) const
overridevirtual

◆ handleTargetFeatures()

bool X86TargetInfo::handleTargetFeatures ( std::vector< std::string > &  Features,
DiagnosticsEngine Diags 
)
overridevirtual

◆ hasFeature()

bool X86TargetInfo::hasFeature ( StringRef  Feature) const
finalvirtual

Determine whether the given target has the given feature.

Reimplemented from clang::TargetInfo.

Definition at line 1161 of file X86.cpp.

References clang::TargetInfo::getTriple(), and clang::TargetInfo::HasFullBFloat16.

◆ hasSjLjLowering()

bool clang::targets::X86TargetInfo::hasSjLjLowering ( ) const
inlineoverridevirtual

Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.

Reimplemented from clang::TargetInfo.

Definition at line 419 of file X86.h.

◆ initFeatureMap()

bool X86TargetInfo::initFeatureMap ( llvm::StringMap< bool > &  Features,
DiagnosticsEngine Diags,
StringRef  CPU,
const std::vector< std::string > &  FeatureVec 
) const
overridevirtual

Initialize the map with the default set of target features for the CPU this should include all legal feature strings on the target.

Returns
False on error (invalid features).

Reimplemented from clang::TargetInfo.

Definition at line 106 of file X86.cpp.

References CPU, clang::TargetInfo::getTriple(), clang::TargetInfo::initFeatureMap(), clang::DiagnosticsEngine::Report(), and setFeatureEnabled().

◆ isSPRegName()

bool clang::targets::X86TargetInfo::isSPRegName ( StringRef  RegName) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 219 of file X86.h.

◆ isValidCPUName()

bool clang::targets::X86TargetInfo::isValidCPUName ( StringRef  Name) const
inlineoverridevirtual

Determine whether this TargetInfo supports the given CPU name.

Reimplemented from clang::TargetInfo.

Definition at line 359 of file X86.h.

◆ isValidFeatureName()

bool X86TargetInfo::isValidFeatureName ( StringRef  Feature) const
overridevirtual

Determine whether this TargetInfo supports the given feature.

Reimplemented from clang::TargetInfo.

Definition at line 1043 of file X86.cpp.

◆ isValidTuneCPUName()

bool clang::targets::X86TargetInfo::isValidTuneCPUName ( StringRef  Name) const
inlineoverridevirtual

Determine whether this TargetInfo supports the given CPU name for tuning.

Reimplemented from clang::TargetInfo.

Definition at line 364 of file X86.h.

◆ multiVersionSortPriority()

unsigned X86TargetInfo::multiVersionSortPriority ( StringRef  Name) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1307 of file X86.cpp.

References getFeature().

◆ setCPU()

bool clang::targets::X86TargetInfo::setCPU ( const std::string &  Name)
inlineoverridevirtual

Target the specified CPU.

Returns
False on error (invalid CPU name).

Reimplemented from clang::TargetInfo.

Definition at line 377 of file X86.h.

◆ setFeatureEnabled()

void X86TargetInfo::setFeatureEnabled ( llvm::StringMap< bool > &  Features,
StringRef  Name,
bool  Enabled 
) const
finalvirtual

Enable or disable a specific target feature; the feature name must be valid.

Reimplemented from clang::TargetInfo.

Definition at line 219 of file X86.cpp.

Referenced by initFeatureMap().

◆ setFPMath()

bool X86TargetInfo::setFPMath ( StringRef  Name)
overridevirtual

Use the specified unit for FP math.

Returns
False on error (invalid unit name).

Reimplemented from clang::TargetInfo.

Definition at line 94 of file X86.cpp.

References FP_387, FP_SSE, and FPMath.

◆ setSupportedOpenCLOpts()

void clang::targets::X86TargetInfo::setSupportedOpenCLOpts ( )
inlineoverridevirtual

Set supported OpenCL extensions and optional core features.

Reimplemented from clang::TargetInfo.

Definition at line 421 of file X86.h.

◆ supportsCpuInit()

bool clang::targets::X86TargetInfo::supportsCpuInit ( ) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 225 of file X86.h.

◆ supportsCpuIs()

bool clang::targets::X86TargetInfo::supportsCpuIs ( ) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 224 of file X86.h.

◆ supportsCpuSupports()

bool clang::targets::X86TargetInfo::supportsCpuSupports ( ) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 223 of file X86.h.

◆ supportsExtendIntArgs()

bool clang::targets::X86TargetInfo::supportsExtendIntArgs ( ) const
inlineoverridevirtual

Whether the option -fextend-arguments={32,64} is supported on the target.

Reimplemented from clang::TargetInfo.

Definition at line 387 of file X86.h.

◆ supportSourceEvalMethod()

bool clang::targets::X86TargetInfo::supportSourceEvalMethod ( ) const
inlineoverridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 209 of file X86.h.

◆ supportsTargetAttributeTune()

bool clang::targets::X86TargetInfo::supportsTargetAttributeTune ( ) const
inlineoverridevirtual

Determine whether this TargetInfo supports tune in target attribute.

Reimplemented from clang::TargetInfo.

Definition at line 355 of file X86.h.

◆ useFP16ConversionIntrinsics()

bool clang::targets::X86TargetInfo::useFP16ConversionIntrinsics ( ) const
inlineoverridevirtual

Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp16.

FIXME: This function should be removed once all targets stop using the conversion intrinsics.

Reimplemented from clang::TargetInfo.

Definition at line 322 of file X86.h.

◆ validateAsmConstraint()

bool X86TargetInfo::validateAsmConstraint ( const char *&  Name,
TargetInfo::ConstraintInfo info 
) const
overridevirtual

◆ validateCpuIs()

bool X86TargetInfo::validateCpuIs ( StringRef  FeatureStr) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1342 of file X86.cpp.

◆ validateCPUSpecificCPUDispatch()

bool X86TargetInfo::validateCPUSpecificCPUDispatch ( StringRef  Name) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1322 of file X86.cpp.

◆ validateCpuSupports()

bool X86TargetInfo::validateCpuSupports ( StringRef  FeatureStr) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1288 of file X86.cpp.

◆ validateGlobalRegisterVariable()

bool clang::targets::X86TargetInfo::validateGlobalRegisterVariable ( StringRef  RegName,
unsigned  RegSize,
bool HasSizeMismatch 
) const
inlineoverridevirtual

Validate register name used for global register variables.

This function returns true if the register passed in RegName can be used for global register variables on this target. In addition, it returns true in HasSizeMismatch if the size of the register doesn't match the variable size passed in RegSize.

Reimplemented from clang::TargetInfo.

Reimplemented in clang::targets::X86_64TargetInfo.

Definition at line 244 of file X86.h.

◆ validateInputSize()

bool X86TargetInfo::validateInputSize ( const llvm::StringMap< bool > &  FeatureMap,
StringRef  Constraint,
unsigned  Size 
) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1632 of file X86.cpp.

References validateOperandSize().

◆ validateOperandSize()

bool X86TargetInfo::validateOperandSize ( const llvm::StringMap< bool > &  FeatureMap,
StringRef  Constraint,
unsigned  Size 
) const
virtual

Reimplemented in clang::targets::X86_32TargetInfo.

Definition at line 1638 of file X86.cpp.

References clang::TargetInfo::hasFeatureEnabled().

Referenced by validateInputSize(), and validateOutputSize().

◆ validateOutputSize()

bool X86TargetInfo::validateOutputSize ( const llvm::StringMap< bool > &  FeatureMap,
StringRef  Constraint,
unsigned  Size 
) const
overridevirtual

Reimplemented from clang::TargetInfo.

Definition at line 1623 of file X86.cpp.

References validateOperandSize().

Member Data Documentation

◆ CPU

llvm::X86::CPUKind clang::targets::X86TargetInfo::CPU = llvm::X86::CK_None
protected

Definition at line 179 of file X86.h.

Referenced by getCPUCacheLineSize(), getTargetDefines(), and initFeatureMap().

◆ FPMath

enum clang::targets::X86TargetInfo::FPMathKind clang::targets::X86TargetInfo::FPMath = FP_Default
protected

Referenced by handleTargetFeatures(), and setFPMath().


The documentation for this class was generated from the following files: