class ARMTargetInfo

Declaration

class ARMTargetInfo : public TargetInfo { /* full declaration omitted */ };

Description

Exposes information about the current target.

Declared at: clang/lib/Basic/Targets/ARM.h:27

Inherits from: TargetInfo

Member Variables

private std::string ABI
private std::string CPU
private llvm::StringRef CPUProfile
private llvm::StringRef CPUAttr
private enum(unnamed enum at / home / hdoc / tmp / llvm - project / clang / lib / Basic / Targets / ARM.h : 57 : 3) FPMath
private llvm::ARM::ISAKind ArchISA
private llvm::ARM::ArchKind ArchKind = llvm::ARM::ArchKind::ARMV4T
private llvm::ARM::ProfileKind ArchProfile
private unsigned int ArchVersion
private unsigned int FPU
private unsigned int MVE
private unsigned int IsAAPCS
private unsigned int HWDiv
private unsigned int SoftFloat
private unsigned int SoftFloatABI
private unsigned int CRC
private unsigned int Crypto
private unsigned int SHA2
private unsigned int AES
private unsigned int DSP
private unsigned int Unaligned
private unsigned int DotProd
private unsigned int HasMatMul
private unsigned int FPRegsDisabled
private unsigned int HasPAC
private unsigned int HasBTI
private uint32_t LDREX
private uint32_t HW_FP
private static const TargetInfo::GCCRegAlias[] GCCRegAliases
private static const char* const[] GCCRegNames
private static const Builtin::Info[] BuiltinInfo

Inherited from TargetInfo:

protected BigEndian
protected TLSSupported
protected VLASupported
protected NoAsmVariants
protected HasLegalHalfType
protected HasFloat128
protected HasFloat16
protected HasBFloat16
protected HasIbm128
protected HasLongDouble
protected HasFPReturn
protected HasStrictFP
protected MaxAtomicPromoteWidth
protected MaxAtomicInlineWidth
protected SimdDefaultAlign
protected DataLayoutString
protected UserLabelPrefix
protected MCountName
protected RegParmMax
protected SSERegParmMax
protected TheCXXABI
protected AddrSpaceMap
protected ProgramAddrSpace
protected PlatformName
protected PlatformMinVersion
protected HasAlignMac68kSupport
protected RealTypeUsesObjCFPRetMask
protected ComplexLongDoubleUsesFP2Ret
protected HasBuiltinMSVaList
protected IsRenderScriptTarget
protected HasAArch64SVETypes
protected HasRISCVVTypes
protected AllowAMDGPUUnsafeFPAtomics
protected ARMCDECoprocMask
protected MaxOpenCLWorkGroupSize
protected MaxBitIntWidth
protected DarwinTargetVariantTriple
protected UseAddrSpaceMapMangling

Inherited from TransferrableTargetInfo:

public PointerWidth
public PointerAlign
public BoolWidth
public BoolAlign
public IntWidth
public IntAlign
public HalfWidth
public HalfAlign
public BFloat16Width
public BFloat16Align
public FloatWidth
public FloatAlign
public DoubleWidth
public DoubleAlign
public LongDoubleWidth
public LongDoubleAlign
public Float128Align
public Ibm128Align
public LargeArrayMinWidth
public LargeArrayAlign
public LongWidth
public LongAlign
public LongLongWidth
public LongLongAlign
public ShortAccumWidth
public ShortAccumAlign
public AccumWidth
public AccumAlign
public LongAccumWidth
public LongAccumAlign
public ShortFractWidth
public ShortFractAlign
public FractWidth
public FractAlign
public LongFractWidth
public LongFractAlign
public PaddingOnUnsignedFixedPoint
public ShortAccumScale
public AccumScale
public LongAccumScale
public DefaultAlignForAttributeAligned
public MinGlobalAlign
public SuitableAlign
public NewAlign
public MaxVectorAlign
public MaxTLSAlign
public HalfFormat
public BFloat16Format
public FloatFormat
public DoubleFormat
public LongDoubleFormat
public Float128Format
public Ibm128Format
protected SizeType
protected IntMaxType
protected PtrDiffType
protected IntPtrType
protected WCharType
protected WIntType
protected Char16Type
protected Char32Type
protected Int64Type
protected Int16Type
protected SigAtomicType
protected ProcessIDType
protected UseSignedCharForObjCBool
protected UseBitFieldTypeAlignment
protected UseZeroLengthBitfieldAlignment
protected UseLeadingZeroLengthBitfield
protected UseExplicitBitFieldAlignment
protected ZeroLengthBitfieldBoundary
protected MaxAlignedAttribute

Method Overview

Inherited from TargetInfo:

Methods

ARMTargetInfo(const llvm::Triple& Triple,
              const clang::TargetOptions& Opts)

Declared at: clang/lib/Basic/Targets/ARM.h:124

Parameters

const llvm::Triple& Triple
const clang::TargetOptions& Opts

static bool FPUModeIsVFP(
    clang::targets::ARMTargetInfo::FPUMode Mode)

Declared at: clang/lib/Basic/Targets/ARM.h:45

Parameters

clang::targets::ARMTargetInfo::FPUMode Mode

clang::TargetInfo::CallingConvCheckResult
checkCallingConvention(
    clang::CallingConv CC) const

Description

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

Declared at: clang/lib/Basic/Targets/ARM.h:193

Parameters

clang::CallingConv CC

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

Declared at: clang/lib/Basic/Targets/ARM.h:182

Parameters

const char*& Constraint

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

Description

Fill a SmallVectorImpl with the valid values to setCPU.

Declared at: clang/lib/Basic/Targets/ARM.h:154

Parameters

SmallVectorImpl<llvm::StringRef>& Values

llvm::StringRef getABI() const

Description

Get the ABI currently in use.

Declared at: clang/lib/Basic/Targets/ARM.h:126

const char* getBFloat16Mangling() const

Description

Return the mangled code of bfloat.

Declared at: clang/lib/Basic/Targets/ARM.h:201

clang::TargetInfo::BuiltinVaListKind
getBuiltinVaListKind() const

Description

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

Declared at: clang/lib/Basic/Targets/ARM.h:176

llvm::StringRef getCPUAttr() const

Declared at: clang/lib/Basic/Targets/ARM.h:120

llvm::StringRef getCPUProfile() const

Declared at: clang/lib/Basic/Targets/ARM.h:121

const char* getClobbers() const

Description

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

Declared at: clang/lib/Basic/Targets/ARM.h:186

llvm::StringRef getConstraintRegister(
    llvm::StringRef Constraint,
    llvm::StringRef Expression) const

Description

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.

Declared at: clang/lib/Basic/Targets/ARM.h:188

Parameters

llvm::StringRef Constraint
llvm::StringRef Expression

int getEHDataRegisterNumber(
    unsigned int RegNo) const

Description

Return the register number that __builtin_eh_return_regno would return with the specified argument. This corresponds with TargetLowering's getExceptionPointerRegister and getExceptionSelectorRegister in the backend.

Declared at: clang/lib/Basic/Targets/ARM.h:195

Parameters

unsigned int RegNo

ArrayRef<TargetInfo::GCCRegAlias>
getGCCRegAliases() const

Declared at: clang/lib/Basic/Targets/ARM.h:179

ArrayRef<const char*> getGCCRegNames() const

Declared at: clang/lib/Basic/Targets/ARM.h:178

ArrayRef<Builtin::Info> getTargetBuiltins() const

Description

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.

Declared at: clang/lib/Basic/Targets/ARM.h:173

void getTargetDefines(
    const clang::LangOptions& Opts,
    clang::MacroBuilder& Builder) const

Description

Appends the target-specific # define values for this target set to the specified buffer.

Declared at: clang/lib/Basic/Targets/ARM.h:170

Parameters

const clang::LangOptions& Opts
clang::MacroBuilder& Builder

void getTargetDefinesARMV81A(
    const clang::LangOptions& Opts,
    clang::MacroBuilder& Builder) const

Declared at: clang/lib/Basic/Targets/ARM.h:164

Parameters

const clang::LangOptions& Opts
clang::MacroBuilder& Builder

void getTargetDefinesARMV82A(
    const clang::LangOptions& Opts,
    clang::MacroBuilder& Builder) const

Declared at: clang/lib/Basic/Targets/ARM.h:166

Parameters

const clang::LangOptions& Opts
clang::MacroBuilder& Builder

void getTargetDefinesARMV83A(
    const clang::LangOptions& Opts,
    clang::MacroBuilder& Builder) const

Declared at: clang/lib/Basic/Targets/ARM.h:168

Parameters

const clang::LangOptions& Opts
clang::MacroBuilder& Builder

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

Description

Perform initialization based on the user configured set of features (e.g., +sse4). The list is guaranteed to have at most one entry per feature. The target may modify the features list, to change which options are passed onwards to the backend. FIXME: This part should be fixed so that we can change handleTargetFeatures to merely a TargetInfo initialization routine.

Declared at: clang/lib/Basic/Targets/ARM.h:146

Parameters

std::vector<std::string>& Features
clang::DiagnosticsEngine& Diags

Returns

False on error.

bool hasBFloat16Type() const

Description

Determine whether the _BFloat16 type is supported on this target.

Declared at: clang/lib/Basic/Targets/ARM.h:151

bool hasBitIntType() const

Description

Determine whether the _BitInt type is supported on this target. This limitation is put into place for ABI reasons. FIXME: _BitInt is a required type in C23, so there's not much utility in asking whether the target supported it or not; I think this should be removed once backends have been alerted to the type and have had the chance to do implementation work if needed.

Declared at: clang/lib/Basic/Targets/ARM.h:199

bool hasCDE() const

Declared at: clang/lib/Basic/Targets/ARM.h:118

bool hasFeature(llvm::StringRef Feature) const

Description

Determine whether the given target has the given feature.

Declared at: clang/lib/Basic/Targets/ARM.h:149

Parameters

llvm::StringRef Feature

bool hasMVE() const

Declared at: clang/lib/Basic/Targets/ARM.h:116

bool hasMVEFloat() const

Declared at: clang/lib/Basic/Targets/ARM.h:117

bool hasSjLjLowering() const

Description

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

Declared at: clang/lib/Basic/Targets/ARM.h:197

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

Description

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

Declared at: clang/lib/Basic/Targets/ARM.h:136

Parameters

llvm::StringMap<bool>& Features
clang::DiagnosticsEngine& Diags
llvm::StringRef CPU
const std::vector<std::string>& FeaturesVec

Returns

False on error (invalid features).

bool isBranchProtectionSupportedArch(
    llvm::StringRef Arch) const

Description

Determine if the Architecture in this TargetInfo supports branch protection

Declared at: clang/lib/Basic/Targets/ARM.h:129

Parameters

llvm::StringRef Arch

bool isCLZForZeroUndef() const

Description

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.

Declared at: clang/lib/Basic/Targets/ARM.h:175

bool isThumb() const

Declared at: clang/lib/Basic/Targets/ARM.h:113

bool isValidCPUName(llvm::StringRef Name) const

Description

brief Determine whether this TargetInfo supports the given CPU name.

Declared at: clang/lib/Basic/Targets/ARM.h:153

Parameters

llvm::StringRef Name

bool isValidFeatureName(
    llvm::StringRef Feature) const

Description

Determine whether this TargetInfo supports the given feature.

Declared at: clang/lib/Basic/Targets/ARM.h:140

Parameters

llvm::StringRef Feature

bool setABI(const std::string& Name)

Description

Use the specified ABI.

Declared at: clang/lib/Basic/Targets/ARM.h:127

Parameters

const std::string& Name

Returns

False on error (invalid ABI name).

void setABIAAPCS()

Declared at: clang/lib/Basic/Targets/ARM.h:105

void setABIAPCS(bool IsAAPCS16)

Declared at: clang/lib/Basic/Targets/ARM.h:106

Parameters

bool IsAAPCS16

void setArchInfo(llvm::ARM::ArchKind Kind)

Declared at: clang/lib/Basic/Targets/ARM.h:109

Parameters

llvm::ARM::ArchKind Kind

void setArchInfo()

Declared at: clang/lib/Basic/Targets/ARM.h:108

void setAtomic()

Declared at: clang/lib/Basic/Targets/ARM.h:111

bool setCPU(const std::string& Name)

Description

Target the specified CPU.

Declared at: clang/lib/Basic/Targets/ARM.h:156

Parameters

const std::string& Name

Returns

False on error (invalid CPU name).

bool setFPMath(llvm::StringRef Name)

Description

Use the specified unit for FP math.

Declared at: clang/lib/Basic/Targets/ARM.h:158

Parameters

llvm::StringRef Name

Returns

False on error (invalid unit name).

bool supportsThumb() const

Declared at: clang/lib/Basic/Targets/ARM.h:114

bool supportsThumb2() const

Declared at: clang/lib/Basic/Targets/ARM.h:115

bool useFP16ConversionIntrinsics() const

Description

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.

Declared at: clang/lib/Basic/Targets/ARM.h:160

bool validateAsmConstraint(
    const char*& Name,
    TargetInfo::ConstraintInfo& Info) const

Declared at: clang/lib/Basic/Targets/ARM.h:180

Parameters

const char*& Name
TargetInfo::ConstraintInfo& Info

bool validateBranchProtection(
    llvm::StringRef Spec,
    llvm::StringRef Arch,
    clang::TargetInfo::BranchProtectionInfo& BPI,
    llvm::StringRef& Err) const

Description

Determine if this TargetInfo supports the given branch protection specification

Declared at: clang/lib/Basic/Targets/ARM.h:130

Parameters

llvm::StringRef Spec
llvm::StringRef Arch
clang::TargetInfo::BranchProtectionInfo& BPI
llvm::StringRef& Err

bool validateConstraintModifier(
    llvm::StringRef Constraint,
    char Modifier,
    unsigned int Size,
    std::string& SuggestedModifier) const

Declared at: clang/lib/Basic/Targets/ARM.h:184

Parameters

llvm::StringRef Constraint
char Modifier
unsigned int Size
std::string& SuggestedModifier