A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/include_2clang_2Basic_2TargetInfo_8h_source.html below:

clang: include/clang/Basic/TargetInfo.h Source File

14#ifndef LLVM_CLANG_BASIC_TARGETINFO_H 15#define LLVM_CLANG_BASIC_TARGETINFO_H 26#include "llvm/ADT/APFloat.h" 27#include "llvm/ADT/APInt.h" 28#include "llvm/ADT/APSInt.h" 29#include "llvm/ADT/ArrayRef.h" 30#include "llvm/ADT/IntrusiveRefCntPtr.h" 31#include "llvm/ADT/SmallSet.h" 32#include "llvm/ADT/StringMap.h" 33#include "llvm/ADT/StringRef.h" 34#include "llvm/ADT/StringSet.h" 35#include "llvm/Frontend/OpenMP/OMPGridValues.h" 36#include "llvm/IR/DerivedTypes.h" 37#include "llvm/Support/DataTypes.h" 38#include "llvm/Support/Error.h" 39#include "llvm/Support/VersionTuple.h" 40#include "llvm/TargetParser/Triple.h" 52class

DiagnosticsEngine;

71namespace

Builtin {

struct

Info; }

167

LLVM_PREFERRED_TYPE(

bool

)

175

LLVM_PREFERRED_TYPE(

bool

)

184

LLVM_PREFERRED_TYPE(

bool

)

189

LLVM_PREFERRED_TYPE(

bool

)

193

LLVM_PREFERRED_TYPE(

bool

)

221

std::shared_ptr<TargetOptions> TargetOpts;

255

LLVM_PREFERRED_TYPE(

bool

)

259

LLVM_PREFERRED_TYPE(

bool

)

260 unsigned

ComplexLongDoubleUsesFP2Ret : 1;

262

LLVM_PREFERRED_TYPE(

bool

)

263 unsigned

HasBuiltinMSVaList : 1;

265

LLVM_PREFERRED_TYPE(

bool

)

266 unsigned

HasAArch64SVETypes : 1;

268

LLVM_PREFERRED_TYPE(

bool

)

269 unsigned

HasRISCVVTypes : 1;

271

LLVM_PREFERRED_TYPE(

bool

)

272 unsigned

AllowAMDGPUUnsafeFPAtomics : 1;

274

LLVM_PREFERRED_TYPE(

bool

)

275 unsigned

HasUnalignedAccess : 1;

277 unsigned

ARMCDECoprocMask : 8;

279 unsigned

MaxOpenCLWorkGroupSize;

281 std

::optional<

unsigned

> MaxBitIntWidth;

283 std

::optional<

llvm

::Triple> DarwinTargetVariantTriple;

290 void

resetDataLayout(StringRef DL, const

char

*UserLabelPrefix = "");

296 llvm

::StringSet<> ReadOnlyFeatures;

312

assert(TargetOpts &&

"Missing target options"

);

320

CharPtrBuiltinVaList = 0,

368

XtensaABIBuiltinVaList

386 case

UnsignedLongLong:

387 return

SignedLongLong;

389

llvm_unreachable(

"Invalid SizeType"

);

394 return

getCorrespondingUnsignedType(IntMaxType);

397 return

AddrSpace == LangAS::Default ? PtrDiffType

398

: getPtrDiffTypeV(AddrSpace);

401 return

getCorrespondingUnsignedType(getPtrDiffType(AddrSpace));

405 return

getCorrespondingUnsignedType(IntPtrType);

413 return

getCorrespondingUnsignedType(Int64Type);

417 return

getCorrespondingUnsignedType(Int16Type);

427 return

UnsignedShort;

433 return

UnsignedLongLong;

435

llvm_unreachable(

"Unexpected signed integer type"

);

444 return

PaddingOnUnsignedFixedPoint;

450 unsigned

getTypeWidth(IntType T)

const

;

453 virtual

IntType getIntTypeByWidth(

unsigned

BitWidth,

bool

IsSigned)

const

;

456 virtual

IntType getLeastIntTypeByWidth(

unsigned

BitWidth,

457 bool

IsSigned)

const

;

471 unsigned

getTypeAlign(IntType T)

const

;

474 static bool

isTypeSigned(IntType T);

479 return

AddrSpace == LangAS::Default ? PointerWidth

480

: getPointerWidthV(AddrSpace);

483 return

AddrSpace == LangAS::Default ? PointerAlign

484

: getPointerAlignV(AddrSpace);

538 return

BitIntMaxAlign.value_or(LongLongAlign);

544 return

llvm::alignTo(NumBits, getBitIntAlign(NumBits));

547 return

std::clamp<unsigned>(llvm::PowerOf2Ceil(NumBits),

getCharWidth

(),

548

getBitIntMaxAlign());

585 return

ShortAccumWidth - ShortAccumScale - 1;

597 return

LongAccumWidth - LongAccumScale - 1;

603 return

PaddingOnUnsignedFixedPoint ? ShortAccumScale : ShortAccumScale + 1;

606 return

PaddingOnUnsignedFixedPoint

607

? getShortAccumIBits()

608

: ShortAccumWidth - getUnsignedShortAccumScale();

614 return

PaddingOnUnsignedFixedPoint ? AccumScale : AccumScale + 1;

617 return

PaddingOnUnsignedFixedPoint ? getAccumIBits()

618

: AccumWidth - getUnsignedAccumScale();

624 return

PaddingOnUnsignedFixedPoint ? LongAccumScale : LongAccumScale + 1;

627 return

PaddingOnUnsignedFixedPoint

628

? getLongAccumIBits()

629

: LongAccumWidth - getUnsignedLongAccumScale();

647 return

PaddingOnUnsignedFixedPoint ? getShortFractScale()

648

: getShortFractScale() + 1;

654 return

PaddingOnUnsignedFixedPoint ? getFractScale() : getFractScale() + 1;

660 return

PaddingOnUnsignedFixedPoint ? getLongFractScale()

661

: getLongFractScale() + 1;

666 return

(getPointerWidth(LangAS::Default) >= 64) ||

667

getTargetOpts().ForceEnableInt128;

685 return

std::min<size_t>(*MaxBitIntWidth, llvm::IntegerType::MAX_INT_BITS);

710 return

HasBFloat16 || HasFullBFloat16;

738 return

DefaultAlignForAttributeAligned;

746 return

MinGlobalAlign;

753 return

NewAlign ? NewAlign : std::max(LongDoubleAlign, LongLongAlign);

796 return

*LongDoubleFormat;

804 return

*Float128Format;

821

llvm_unreachable(

"ibm128 not implemented on this target"

);

829 return

LangOptions::FPEvalMethodKind::FEM_Source;

851

uint64_t AlignmentInBits)

const

{

852 return

AtomicSizeInBits <= AlignmentInBits &&

853

AtomicSizeInBits <= getMaxAtomicInlineWidth() &&

855

llvm::isPowerOf2_64(AtomicSizeInBits /

getCharWidth

()));

875 return

getDefaultAlignForAttributeAligned();

880 return

getTypeWidth(IntMaxType);

885 return

getPointerWidth(LangAS::Default);

905 return

hasUnalignedAccess();

925 return

UseSignedCharForObjCBool;

928

UseSignedCharForObjCBool =

false

;

934 return

UseBitFieldTypeAlignment;

940 return

UseZeroLengthBitfieldAlignment;

946 return

UseLeadingZeroLengthBitfield;

952 return

ZeroLengthBitfieldBoundary;

962 return

UseExplicitBitFieldAlignment;

967 return

HasAlignMac68kSupport;

973 static const char

*getTypeName(IntType T);

978 const char

*getTypeConstantSuffix(IntType T)

const

;

984 static const char

*getTypeFormatModifier(IntType T);

995 return

ComplexLongDoubleUsesFP2Ret;

1009 return

UseAddrSpaceMapMangling;

1025 virtual

std::optional<std::pair<unsigned, unsigned>>

1027 bool

IsArmStreamingFunction)

const

{

1028 return

std::nullopt;

1065 bool

isValidClobber(StringRef Name)

const

;

1071 virtual bool

isValidGCCRegisterName(StringRef Name)

const

;

1078

StringRef getNormalizedGCCRegisterName(StringRef Name,

1079 bool

ReturnCanonical =

false

)

const

;

1097

CI_AllowsMemory = 0x01,

1098

CI_AllowsRegister = 0x02,

1099

CI_ReadWrite = 0x04,

1100

CI_HasMatchingInput = 0x08,

1101

CI_ImmediateConstant = 0x10,

1102

CI_EarlyClobber = 0x20,

1117

: Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()),

1119

ImmRange.Min = ImmRange.Max = 0;

1120

ImmRange.isConstrained =

false

;

1124 const

std::string &

getName

()

const

{

return

Name; }

1141

assert(hasTiedOperand() &&

"Has no tied operand!"

);

1142 return

(

unsigned

)TiedOperand;

1146 return

(Flags & CI_ImmediateConstant) != 0;

1149 if

(!ImmSet.empty())

1150 return Value

.isSignedIntN(32) && ImmSet.contains(

Value

.getZExtValue());

1151 return

!ImmRange.isConstrained ||

1152

(

Value

.sge(ImmRange.Min) &&

Value

.sle(ImmRange.Max));

1161

Flags |= CI_ImmediateConstant;

1162

ImmRange.Min =

Min

;

1163

ImmRange.Max =

Max

;

1164

ImmRange.isConstrained =

true

;

1167

Flags |= CI_ImmediateConstant;

1168 for

(

int

Exact : Exacts)

1169

ImmSet.insert(Exact);

1172

Flags |= CI_ImmediateConstant;

1173

ImmSet.insert(Exact);

1176

Flags |= CI_ImmediateConstant;

1185

Flags = Output.

Flags

;

1199 bool

&HasSizeMismatch)

const

{

1200

HasSizeMismatch =

false

;

1207 bool

validateOutputConstraint(ConstraintInfo &Info)

const

;

1209

ConstraintInfo &info)

const

;

1226

std::string &

)

const

{

1233 bool

resolveSymbolicName(

const char

*&Name,

1235 unsigned

&Index)

const

;

1242 if

(*Constraint ==

'p'

)

1243 return

std::string(

"r"

);

1244 return

std::string(1, *Constraint);

1250 return

std::nullopt;

1269 return

std::nullopt;

1273

assert(!DataLayoutString.empty() &&

"Uninitialized DataLayout!"

);

1274 return

DataLayoutString.c_str();

1278 const char

*

const

Aliases[5];

1283 const char

*

const

Names[5];

1302 return

getTriple().isWindowsMSVCEnvironment() ||

1303

getTriple().isWindowsItaniumEnvironment() || getTriple().isPS();

1308 return

getTriple().isPS() ||

1311

(getTriple().isWindowsItaniumEnvironment() &&

1312

getTriple().getVendor() == llvm::Triple::SCEI);

1326 virtual bool

initFeatureMap(llvm::StringMap<bool> &Features,

1328 const

std::vector<std::string> &FeatureVec)

const

;

1331 virtual

StringRef

getABI

()

const

{

return

StringRef(); }

1341 virtual bool setCPU

(

const

std::string &Name) {

1350

fillValidCPUList(Values);

1361 return

isValidCPUName(Name);

1374 virtual bool setABI

(

const

std::string &Name) {

1387

StringRef Name)

const

{

1388 return

Features.lookup(Name);

1395 bool

Enabled)

const

{

1396

Features[Name] = Enabled;

1419 switch

(SignReturnAddr) {

1420 case

LangOptions::SignReturnAddressScopeKind::None:

1422 case

LangOptions::SignReturnAddressScopeKind::NonLeaf:

1424 case

LangOptions::SignReturnAddressScopeKind::All:

1427

llvm_unreachable(

"Unexpected SignReturnAddressScopeKind"

);

1432 case

LangOptions::SignReturnAddressKeyKind::AKey:

1434 case

LangOptions::SignReturnAddressKeyKind::BKey:

1437

llvm_unreachable(

"Unexpected SignReturnAddressKeyKind"

);

1442

SignKey(

LangOptions

::SignReturnAddressKeyKind::AKey),

1443

BranchTargetEnforcement(

false

), BranchProtectionPAuthLR(

false

),

1444

GuardedControlStack(

false

) {}

1448

LangOpts.hasSignReturnAddress()

1449

? (LangOpts.isSignReturnAddressScopeAll()

1450

? LangOptions::SignReturnAddressScopeKind::All

1451

: LangOptions::SignReturnAddressScopeKind::NonLeaf)

1452

: LangOptions::SignReturnAddressScopeKind::None;

1453

SignKey = LangOpts.isSignReturnAddressWithAKey()

1454

? LangOptions::SignReturnAddressKeyKind::AKey

1455

: LangOptions::SignReturnAddressKeyKind::BKey;

1456

BranchTargetEnforcement = LangOpts.BranchTargetEnforcement;

1457

BranchProtectionPAuthLR = LangOpts.BranchProtectionPAuthLR;

1458

GuardedControlStack = LangOpts.GuardedControlStack;

1472

StringRef &Err)

const

{

1500 return

ReadOnlyFeatures.count(Feature);

1506 return

getTriple().isX86() || getTriple().isAArch64() ||

1507

getTriple().isRISCV();

1512 if

(getTriple().isOSBinFormatMachO())

1514 if

(getTriple().isOSWindows() && getTriple().isAArch64())

1516 if

(getTriple().getArch() == llvm::Triple::ArchType::avr)

1518 return

getTriple().isOSBinFormatELF() &&

1519

((getTriple().isOSLinux() && !getTriple().isMusl()) ||

1520

getTriple().isOSFreeBSD());

1552 "cpu_specific Multiversioning not implemented on this target"

);

1559 "cpu_specific Multiversioning not implemented on this target"

);

1568 "cpu_specific Multiversioning not implemented on this target"

);

1574 return

std::nullopt;

1579

assert(RegParmMax < 7 &&

"RegParmMax value is larger than AST can handle"

);

1585 return

TLSSupported;

1599 return

getTriple().isOSWindows() &&

1600

(getTriple().isX86() ||

1601

getTriple().getArch() == llvm::Triple::aarch64);

1611 return

NoAsmVariants;

1631 return

getAddressSpaceMap()[(

unsigned

)AS];

1637 virtual bool

validatePointerAuthKey(

const

llvm::APSInt &value)

const

;

1656 return

LangAS::Default;

1662

llvm_unreachable(

"getGridValue not implemented on this target"

);

1705 return

CCCR_Warning;

1717 virtual

CallingConvKind getCallingConvKind(

bool

ClangABICompat4)

const

;

1725 virtual bool

areDefaultedSMFStillPOD(

const LangOptions

&)

const

;

1758#define OPENCLEXTNAME(Ext) \ 1759 setFeatureEnabled(getTargetOpts().OpenCLFeaturesMap, #Ext, V); 1760#include "clang/Basic/OpenCLExtensions.def" 1765 for

(

const auto

&Ext : getTargetOpts().OpenCLExtensionsAsWritten) {

1766 bool

IsPrefixed = (Ext[0] ==

'+'

|| Ext[0] ==

'-'

);

1767

std::string Name = IsPrefixed ? Ext.substr(1) : Ext;

1768 bool V

= IsPrefixed ? Ext[0] ==

'+'

:

true

;

1770 if

(Name ==

"all"

) {

1771

supportAllOpenCLOpts(

V

);

1775

getTargetOpts().OpenCLFeaturesMap[Name] =

V

;

1781 return

getTargetOpts().OpenCLFeaturesMap;

1786 return

getTargetOpts().OpenCLFeaturesMap;

1805 return

std::nullopt;

1811 return

getTargetOpts().SDKVersion;

1821 virtual bool

validateOpenCLTarget(

const LangOptions

&Opts,

1832 return

DarwinTargetVariantTriple ? &*DarwinTargetVariantTriple :

nullptr

;

1838 return

!getTargetOpts().DarwinTargetVariantSDKVersion.empty()

1839

? getTargetOpts().DarwinTargetVariantSDKVersion

1840

: std::optional<VersionTuple>();

1852 return

std::make_pair(64, 64);

1859 return

PointerWidth;

1862 return

PointerAlign;

1874 void

CheckFixedPointBits()

const

;

1878

std::unique_ptr<clang::TargetInfo>

Provides definitions for the various language-specific address spaces.

Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.

@ LLVM_MARK_AS_BITMASK_ENUM

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

Defines the clang::LangOptions interface.

static unsigned getCharWidth(tok::TokenKind kind, const TargetInfo &Target)

Defines various enumerations that describe declaration and type specifiers.

Defines the TargetCXXABI class, which abstracts details of the C++ ABI that we're targeting.

Defines the clang::TargetOptions class.

Concrete class used by the front-end to report problems and issues.

SignReturnAddressScopeKind

FPEvalMethodKind

Possible float expression evaluation method choices.

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...

The basic abstraction for the target C++ ABI.

LangOptions::SignReturnAddressScopeKind SignReturnAddr

const char * getSignKeyStr() const

BranchProtectionInfo(const LangOptions &LangOpts)

LangOptions::SignReturnAddressKeyKind SignKey

bool BranchProtectionPAuthLR

bool BranchTargetEnforcement

const char * getSignReturnAddrStr() const

Exposes information about the current target.

const LangASMap & getAddressSpaceMap() const

unsigned getNewAlign() const

Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' is g...

virtual bool supportsCpuSupports() const

unsigned getUnsignedLongFractScale() const

getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.

virtual bool setCPU(const std::string &Name)

Target the specified CPU.

IntType getUnsignedPtrDiffType(LangAS AddrSpace) const

virtual std::optional< unsigned > getDWARFAddressSpace(unsigned AddressSpace) const

virtual std::optional< std::string > handleAsmEscapedChar(char C) const

Replace some escaped characters with another string based on target-specific rules.

unsigned getLongFractAlign() const

virtual bool validateCpuIs(StringRef Name) const

virtual bool hasLegalHalfType() const

Determine whether _Float16 is supported on this target.

virtual bool hasLongDoubleType() const

Determine whether the long double type is supported on this target.

unsigned getShortAccumAlign() const

virtual bool supportsCpuInit() const

virtual unsigned getExnObjectAlignment() const

Return the alignment (in bits) of the thrown exception object.

virtual bool hasBitIntType() const

Determine whether the _BitInt 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.

unsigned getLargeArrayAlign() const

unsigned getIbm128Align() const

const char * getMCountName() const

Returns the name of the mcount instrumentation function.

virtual std::optional< std::string > getTargetID() const

Returns the target ID if supported.

unsigned getShortWidth() const

getShortWidth/Align - Return the size of 'signed short' and 'unsigned short' for this target,...

unsigned getUnsignedAccumScale() const

getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' ty...

unsigned getIntAlign() const

virtual ArrayRef< AddlRegName > getGCCAddlRegNames() const

unsigned getUnsignedAccumIBits() const

const llvm::Triple & getTriple() const

Returns the target triple of the primary target.

virtual const char * getFloat128Mangling() const

Return the mangled code of __float128.

unsigned getAccumWidth() const

getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target,...

IntType getUIntPtrType() const

bool useLeadingZeroLengthBitfield() const

Check whether zero length bitfield alignment is respected if they are leading members.

const LangASMap * AddrSpaceMap

const char * UserLabelPrefix

IntType getInt64Type() const

unsigned getMaxAtomicInlineWidth() const

Return the maximum width lock-free atomic operation which can be inlined given the supported features...

virtual bool supportSourceEvalMethod() const

unsigned getUnsignedFractScale() const

getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.

bool hasAlignMac68kSupport() const

Check whether this target support '#pragma options align=mac68k'.

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

unsigned getWCharAlign() const

virtual enum IntType getPtrDiffTypeV(LangAS AddrSpace) const

unsigned getLongAlign() const

virtual bool isCLZForZeroUndef() const

The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for ...

virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const

Map from the address space field in builtin description strings to the language address space.

virtual LangAS getOpenCLBuiltinAddressSpace(unsigned AS) const

Map from the address space field in builtin description strings to the language address space.

virtual std::optional< LangAS > getConstantAddressSpace() const

Return an AST address space which can be used opportunistically for constant global memory.

const char * getDataLayoutString() const

unsigned getBitIntAlign(unsigned NumBits) const

bool isReadOnlyFeature(StringRef Feature) const

Determine whether the given target feature is read only.

StringRef getPlatformName() const

Retrieve the name of the platform as it is used in the availability attribute.

virtual bool isBranchProtectionSupportedArch(StringRef Arch) const

Determine if the Architecture in this TargetInfo supports branch protection.

unsigned getLongLongAlign() const

virtual bool hasFeatureEnabled(const llvm::StringMap< bool > &Features, StringRef Name) const

Check if target has a given feature enabled.

virtual const char * getStaticInitSectionSpecifier() const

Return the section to use for C++ static initialization functions.

unsigned getDefaultAlignForAttributeAligned() const

Return the default alignment for attribute((aligned)) on this target, to be used if no alignment valu...

unsigned getBFloat16Width() const

getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.

BuiltinVaListKind

The different kinds of __builtin_va_list types defined by the target implementation.

@ AArch64ABIBuiltinVaList

__builtin_va_list as defined by the AArch64 ABI http://infocenter.arm.com/help/topic/com....

@ PNaClABIBuiltinVaList

__builtin_va_list as defined by the PNaCl ABI: http://www.chromium.org/nativeclient/pnacl/bitcode-abi...

@ PowerABIBuiltinVaList

__builtin_va_list as defined by the Power ABI: https://www.power.org /resources/downloads/Power-Arch-...

@ AAPCSABIBuiltinVaList

__builtin_va_list as defined by ARM AAPCS ABI http://infocenter.arm.com

@ VoidPtrBuiltinVaList

typedef void* __builtin_va_list;

@ X86_64ABIBuiltinVaList

__builtin_va_list as defined by the x86-64 ABI: http://refspecs.linuxbase.org/elf/x86_64-abi-0....

virtual size_t getMaxBitIntWidth() const

virtual bool setFPMath(StringRef Name)

Use the specified unit for FP math.

bool isSEHTrySupported() const

Whether the target supports SEH __try.

unsigned getChar32Width() const

getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.

virtual bool useFP16ConversionIntrinsics() const

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

const llvm::Triple * getDarwinTargetVariantTriple() const

Returns the darwin target variant triple, the variant of the deployment target for which the code is ...

virtual uint64_t getNullPointerValue(LangAS AddrSpace) const

Get integer value for null pointer.

virtual ArrayRef< const char * > getGCCRegNames() const =0

virtual std::optional< unsigned > getCPUCacheLineSize() const

virtual ArrayRef< Builtin::Info > getTargetBuiltins() const =0

Return information about target-specific builtins for the current primary target, and info about whic...

unsigned getLongAccumScale() const

getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' typ...

unsigned getLongFractScale() const

getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.

unsigned getIbm128Width() const

getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.

uint64_t getPointerWidth(LangAS AddrSpace) const

Return the width of pointers on this target, for the specified address space.

virtual bool allowHalfArgsAndReturns() const

Whether half args and returns are supported.

unsigned getShortFractAlign() const

unsigned getFractAlign() const

const llvm::StringMap< bool > & getSupportedOpenCLOpts() const

Get const supported OpenCL extensions and optional core features.

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 std::pair< unsigned, unsigned > hardwareInterferenceSizes() const

The first value in the pair is the minimum offset between two objects to avoid false sharing (destruc...

virtual CallingConv getDefaultCallingConv() const

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

bool useSignedCharForObjCBool() const

Check if the Objective-C built-in boolean type should be signed char.

virtual bool hasPS4DLLImportExport() const

virtual bool hasInt128Type() const

Determine whether the __int128 type is supported on this target.

unsigned getAccumIBits() const

bool useObjCFPRetForRealType(FloatModeKind T) const

Check whether the given real type should use the "fpret" flavor of Objective-C message passing on thi...

virtual LangOptions::FPEvalMethodKind getFPEvalMethod() const

Return the value for the C99 FLT_EVAL_METHOD macro.

unsigned getHalfAlign() const

IntType getSigAtomicType() const

virtual bool validateOutputSize(const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const

unsigned getAccumScale() const

getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.

virtual bool hasFloat16Type() const

Determine whether the _Float16 type is supported on this target.

unsigned getBFloat16Align() const

virtual CallingConvCheckResult checkCallingConvention(CallingConv CC) const

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

unsigned getMaxVectorAlign() const

Return the maximum vector alignment supported for the given target.

VersionTuple PlatformMinVersion

unsigned getChar16Width() const

getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.

virtual unsigned getVtblPtrAddressSpace() const

virtual void setAuxTarget(const TargetInfo *Aux)

unsigned getLongAccumAlign() const

unsigned getIntWidth() const

getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target,...

IntType getPtrDiffType(LangAS AddrSpace) const

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

Perform initialization based on the user configured set of features (e.g., +sse4).

bool isLittleEndian() const

unsigned getShortAccumIBits() const

bool hasUnalignedAccess() const

Return true iff unaligned accesses are a single instruction (rather than a synthesized sequence).

virtual const char * getIbm128Mangling() const

Return the mangled code of __ibm128.

virtual std::optional< std::pair< unsigned, unsigned > > getVScaleRange(const LangOptions &LangOpts, bool IsArmStreamingFunction) const

Returns target-specific min and max values VScale_Range.

unsigned getFloatWidth() const

getFloatWidth/Align/Format - Return the size/align/format of 'float'.

virtual ArrayRef< GCCRegAlias > getGCCRegAliases() const =0

unsigned getLongAccumIBits() const

IntType getSizeType() const

IntType getWIntType() const

virtual void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const =0

===-— Other target property query methods -----------------------—===//

static IntType getCorrespondingUnsignedType(IntType T)

unsigned getLongAccumWidth() const

getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this...

virtual bool setABI(const std::string &Name)

Use the specified ABI.

void noSignedCharForObjCBool()

unsigned getHalfWidth() const

getHalfWidth/Align/Format - Return the size/align/format of 'half'.

virtual bool validateInputSize(const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const

bool allowAMDGPUUnsafeFPAtomics() const

Returns whether or not the AMDGPU unsafe floating point atomics are allowed.

unsigned getShortAccumScale() const

getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' t...

unsigned getBitIntWidth(unsigned NumBits) const

getBitIntAlign/Width - Return aligned size of '_BitInt' and 'unsigned _BitInt' for this target,...

unsigned getBoolAlign() const

Return the alignment of '_Bool' and C++ 'bool' for this target.

virtual bool defaultsToAIXPowerAlignment() const

Whether target defaults to the power alignment rules of AIX.

const llvm::fltSemantics & getDoubleFormat() const

virtual bool hasStrictFP() const

Determine whether constrained floating point is supported on this target.

virtual char CPUSpecificManglingCharacter(StringRef Name) const

virtual void fillValidTuneCPUList(SmallVectorImpl< StringRef > &Values) const

Fill a SmallVectorImpl with the valid values for tuning CPU.

virtual bool allowDebugInfoForExternalRef() const

Whether target allows debuginfo types for decl only variables/functions.

unsigned getCharAlign() const

VersionTuple getPlatformMinVersion() const

Retrieve the minimum desired version of the platform, to which the program should be 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...

unsigned getLongLongWidth() const

getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this targ...

unsigned getMaxOpenCLWorkGroupSize() const

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 alig...

bool isTLSSupported() const

Whether the target supports thread-local storage.

unsigned getZeroLengthBitfieldBoundary() const

Get the fixed alignment value in bits for a member that follows a zero length bitfield.

IntType getIntPtrType() const

uint32_t getARMCDECoprocMask() const

For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.

unsigned getMaxAlignedAttribute() const

Get the maximum alignment in bits for a static variable with aligned attribute.

IntType getInt16Type() const

const llvm::fltSemantics & getHalfFormat() const

virtual bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const =0

virtual void supportAllOpenCLOpts(bool V=true)

llvm::StringMap< bool > & getSupportedOpenCLOpts()

Get supported OpenCL extensions and optional core features.

virtual uint64_t getPointerAlignV(LangAS AddrSpace) const

virtual const char * getLongDoubleMangling() const

Return the mangled code of long double.

bool UseAddrSpaceMapMangling

Specify if mangling based on address space map should be used or not for language specific address sp...

virtual bool supportsExtendIntArgs() const

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

unsigned getLargeArrayMinWidth() const

unsigned getMaxTLSAlign() const

Return the maximum alignment (in bits) of a TLS variable.

virtual unsigned getRegisterWidth() const

Return the "preferred" register width on this target.

bool supportsIFunc() const

Identify whether this target supports IFuncs.

virtual bool isValidTuneCPUName(StringRef Name) const

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

virtual bool validateCpuSupports(StringRef Name) const

IntType getWCharType() const

IntType getUInt16Type() const

unsigned getChar16Align() const

virtual unsigned getMinGlobalAlign(uint64_t Size, bool HasNonWeakDef) const

getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explic...

virtual bool supportsCpuIs() const

virtual BuiltinVaListKind getBuiltinVaListKind() const =0

Returns the kind of __builtin_va_list type that should be used with this target.

bool isVLASupported() const

Whether target supports variable-length arrays.

bool hasCheapUnalignedBitFieldAccess() const

Return true iff unaligned accesses are cheap.

unsigned getTargetAddressSpace(LangAS AS) const

const llvm::fltSemantics & getBFloat16Format() const

const char * getUserLabelPrefix() const

Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols b...

unsigned getAccumAlign() const

unsigned getFloat128Width() const

getFloat128Width/Align/Format - Return the size/align/format of '__float128'.

virtual bool hasIbm128Type() const

Determine whether the __ibm128 type is supported on this target.

bool useExplicitBitFieldAlignment() const

Check whether explicit bitfield alignment attributes should be.

virtual bool doesFeatureAffectCodeGen(StringRef Feature) const

Returns true if feature has an impact on target code generation.

virtual bool validateConstraintModifier(StringRef, char, unsigned, std::string &) const

uint64_t getPointerAlign(LangAS AddrSpace) const

IntType getChar16Type() const

unsigned getUnsignedShortAccumIBits() const

IntType getChar32Type() const

unsigned getWCharWidth() const

getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.

IntType getUInt64Type() const

virtual bool hasFPReturn() const

Determine whether return of a floating point value is supported on this target.

std::string DataLayoutString

unsigned getUnsignedLongAccumScale() const

getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _...

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 la...

virtual void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const

Fill a SmallVectorImpl with the valid values to setCPU.

IntType getSignedSizeType() const

bool hasBuiltinMSVaList() const

Returns whether or not type __builtin_ms_va_list type is available on this target.

virtual bool hasFloat128Type() const

Determine whether the __float128 type is supported on this target.

unsigned getUnsignedLongAccumIBits() const

virtual void setMaxAtomicWidth()

Set the maximum inline or promote width lock-free atomic operation for the given target.

unsigned getUnsignedShortFractScale() const

getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.

bool hasNoAsmVariants() const

Return true if {|} are normal characters in the asm string.

virtual bool validateCPUSpecificCPUDispatch(StringRef Name) const

const llvm::fltSemantics & getLongDoubleFormat() const

virtual StringRef getCPUSpecificTuneName(StringRef Name) const

const llvm::fltSemantics & getFloatFormat() const

TargetCXXABI getCXXABI() const

Get the C++ ABI currently in use.

unsigned getBitIntMaxAlign() const

getBitIntMaxAlign() - Returns the maximum possible alignment of '_BitInt' and 'unsigned _BitInt'.

bool hasAArch64SVETypes() const

Returns whether or not the AArch64 SVE built-in types are available on this target.

unsigned getDoubleAlign() const

virtual bool hasProtectedVisibility() const

Does this target support "protected" visibility?

unsigned getRegParmMax() const

unsigned getDoubleWidth() const

getDoubleWidth/Align/Format - Return the size/align/format of 'double'.

virtual bool checkArithmeticFenceSupported() const

Controls if __arithmetic_fence is supported in the targeted backend.

unsigned getIntMaxTWidth() const

Return the size of intmax_t and uintmax_t for this target, in bits.

virtual int getEHDataRegisterNumber(unsigned RegNo) const

Return the register number that __builtin_eh_return_regno would return with the specified argument.

unsigned getShortAccumWidth() const

getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for t...

virtual StringRef getABI() const

Get the ABI currently in use.

unsigned getSuitableAlign() const

Return the alignment that is the largest alignment ever used for any scalar/SIMD data type on the tar...

bool useObjCFP2RetForComplexLongDouble() const

Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on t...

virtual const llvm::omp::GV & getGridValue() const

virtual uint64_t getPointerWidthV(LangAS AddrSpace) const

virtual bool allowsLargerPreferedTypeAlignment() const

Whether target allows to overalign ABI-specified preferred alignment.

virtual std::string_view getClobbers() const =0

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

virtual unsigned getUnwindWordWidth() const

unsigned getBoolWidth() const

Return the size of '_Bool' and C++ 'bool' for this target, in bits.

virtual bool isValidFeatureName(StringRef Feature) const

Determine whether this TargetInfo supports the given feature.

bool useAddressSpaceMapMangling() const

Specify if mangling based on address space map should be used or not for language specific address sp...

unsigned getCharWidth() const

bool useZeroLengthBitfieldAlignment() const

Check whether zero length bitfields should force alignment of the next member.

virtual bool validateTarget(DiagnosticsEngine &Diags) const

Check the target is valid after it is fully initialized.

unsigned getLongWidth() const

getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target,...

unsigned getLongFractWidth() const

getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this...

IntType getIntMaxType() const

virtual bool supportsTargetAttributeTune() const

Determine whether this TargetInfo supports tune in target attribute.

unsigned getFractScale() const

getFractScale - Return the number of fractional bits in a 'signed _Fract' type.

bool supportsMultiVersioning() const

Identify whether this target supports multiversioning of functions, which requires support for cpu_su...

virtual uint64_t getFMVPriority(ArrayRef< StringRef > Features) const

virtual bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const

Validate register name used for global register variables.

virtual bool shouldDLLImportComdatSymbols() const

Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attrib...

unsigned getFractWidth() const

getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target,...

virtual std::string convertConstraint(const char *&Constraint) const

unsigned char MaxAtomicInlineWidth

virtual void setCommandLineOpenCLOpts()

Set supported OpenCL extensions as written on command line.

unsigned getFloat128Align() const

virtual bool hasBFloat16Type() const

Determine whether the _BFloat16 type is supported on this target.

unsigned getShortFractScale() const

getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.

IntType getProcessIDType() const

unsigned getFloatAlign() const

virtual uint64_t getMaxPointerWidth() const

Return the maximum width of pointers on this target.

unsigned getShortFractWidth() const

getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for t...

virtual bool isAddressSpaceSupersetOf(LangAS A, LangAS B) const

Returns true if an address space can be safely converted to another.

virtual bool hasHIPImageSupport() const

Whether to support HIP image/texture API's.

virtual bool hasFeature(StringRef Feature) const

Determine whether the given target has the given feature.

unsigned getUnsignedShortAccumScale() const

getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short...

virtual bool isValidCPUName(StringRef Name) const

Determine whether this TargetInfo supports the given CPU name.

unsigned getChar32Align() const

bool doUnsignedFixedPointTypesHavePadding() const

In the event this target uses the same number of fractional bits for its unsigned types as it does wi...

unsigned getMaxAtomicPromoteWidth() const

Return the maximum width lock-free atomic operation which will ever be supported for the given target...

virtual bool isSPRegName(StringRef) const

unsigned getInt128Align() const

getInt128Align() - Returns the alignment of Int128.

IntType getUIntMaxType() const

const llvm::fltSemantics & getFloat128Format() const

virtual bool hasSjLjLowering() const

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

const llvm::VersionTuple & getSDKVersion() const

unsigned getLongDoubleWidth() const

getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.

unsigned getLongDoubleAlign() const

const llvm::fltSemantics & getIbm128Format() const

bool useBitFieldTypeAlignment() const

Check whether the alignment of bit-field types is respected when laying out structures.

unsigned getShortAlign() const

virtual const char * getBFloat16Mangling() const

Return the mangled code of bfloat.

virtual bool isNan2008() const

Returns true if NaN encoding is IEEE 754-2008.

virtual void setSupportedOpenCLOpts()

Set supported OpenCL extensions and optional core features.

bool hasRISCVVTypes() const

Returns whether or not the RISC-V V built-in types are available on this target.

virtual bool validateBranchProtection(StringRef Spec, StringRef Arch, BranchProtectionInfo &BPI, StringRef &Err) const

Determine if this TargetInfo supports the given branch protection specification.

Options for controlling the target.

std::unique_ptr< clang::TargetInfo > AllocateTarget(const llvm::Triple &Triple, const clang::TargetOptions &Opts)

The JSON file list parser is used to communicate input to InstallAPI.

unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap

The type of a lookup table which maps from language-specific address spaces to target-specific ones.

bool isTargetAddressSpace(LangAS AS)

OpenCLTypeKind

OpenCL type kinds.

unsigned toTargetAddressSpace(LangAS AS)

LangAS

Defines the address space values used by the address space qualifier of QualType.

const FunctionProtoType * T

CallingConv

CallingConv - Specifies the calling convention that a function uses.

LangAS getLangASFromTargetAS(unsigned TargetAS)

@ Other

Other implicit parameter.

Diagnostic wrappers for TextAPI types for error reporting.

Contains information gathered from parsing the contents of TargetAttr.

std::vector< std::string > Features

StringRef BranchProtection

bool operator==(const ParsedTargetAttr &Other) const

llvm::SmallSet< int, 4 > ImmSet

const std::string & getConstraintStr() const

std::string ConstraintStr

void setHasMatchingInput()

bool hasMatchingInput() const

Return true if this output operand has a matching (tied) input operand.

void setRequiresImmediate()

unsigned getTiedOperand() const

bool allowsMemory() const

const std::string & getName() const

ConstraintInfo(StringRef ConstraintStr, StringRef Name)

void setRequiresImmediate(int Exact)

void setTiedOperand(unsigned N, ConstraintInfo &Output)

Indicate that this is an input operand that is tied to the specified output operand.

bool isValidAsmImmediate(const llvm::APInt &Value) const

bool requiresImmediateConstant() const

bool hasTiedOperand() const

Return true if this input operand is a matching constraint that ties it to an output operand.

bool allowsRegister() const

void setRequiresImmediate(llvm::ArrayRef< int > Exacts)

void setRequiresImmediate(int Min, int Max)

const char *const Register

Fields controlling how types are laid out in memory; these may need to be copied for targets like AMD...

const llvm::fltSemantics * DoubleFormat

unsigned UseZeroLengthBitfieldAlignment

Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.

unsigned short SuitableAlign

unsigned char PointerWidth

unsigned UseExplicitBitFieldAlignment

Whether explicit bit field alignment attributes are honored.

IntType

===-— Target Data Type Query Methods ----------------------------—===//

const llvm::fltSemantics * LongDoubleFormat

unsigned char LargeArrayAlign

unsigned char ShortAccumWidth

unsigned ZeroLengthBitfieldBoundary

If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield,...

const llvm::fltSemantics * Float128Format

std::optional< unsigned > BitIntMaxAlign

unsigned char DoubleWidth

unsigned UseLeadingZeroLengthBitfield

Whether zero length bitfield alignment is respected if they are the leading members.

unsigned char LongLongAlign

unsigned char LongAccumAlign

unsigned UseBitFieldTypeAlignment

Control whether the alignment of bit-field types is respected when laying out structures.

unsigned char LargeArrayMinWidth

unsigned char PointerAlign

unsigned char BFloat16Width

unsigned char LongDoubleAlign

unsigned char LongDoubleWidth

unsigned char BFloat16Align

unsigned char Int128Align

unsigned char ShortAccumScale

unsigned MaxAlignedAttribute

If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute o...

unsigned char DoubleAlign

bool PaddingOnUnsignedFixedPoint

const llvm::fltSemantics * Ibm128Format

unsigned char LongFractWidth

unsigned char Ibm128Align

unsigned char ShortFractAlign

unsigned char ShortAccumAlign

unsigned char LongFractAlign

const llvm::fltSemantics * FloatFormat

const llvm::fltSemantics * HalfFormat

unsigned char LongLongWidth

unsigned char LongAccumScale

unsigned char MinGlobalAlign

unsigned UseSignedCharForObjCBool

Whether Objective-C's built-in boolean type should be signed char.

const llvm::fltSemantics * BFloat16Format

unsigned char Float128Align

unsigned char LongAccumWidth

unsigned char DefaultAlignForAttributeAligned

unsigned char ShortFractWidth


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4