class BaseSPIRTargetInfo

Declaration

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

Description

Exposes information about the current target.

Declared at: clang/lib/Basic/Targets/SPIR.h:78

Inherits from: TargetInfo

Member Variables

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

BaseSPIRTargetInfo(const llvm::Triple& Triple,
                   const clang::TargetOptions&)

Declared at: clang/lib/Basic/Targets/SPIR.h:80

Parameters

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

void adjust(clang::DiagnosticsEngine& Diags,
            clang::LangOptions& Opts)

Description

Set forced language options. Apply changes to the target information with respect to certain language options which change the target configuration and adjust the language based on the target options where applicable.

Declared at: clang/lib/Basic/Targets/SPIR.h:142

Parameters

clang::DiagnosticsEngine& Diags
clang::LangOptions& Opts

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/SPIR.h:129

Parameters

clang::CallingConv CC

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/SPIR.h:120

const char* getClobbers() const

Description

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

Declared at: clang/lib/Basic/Targets/SPIR.h:107

Optional<unsigned int> getDWARFAddressSpace(
    unsigned int AddressSpace) const

Declared at: clang/lib/Basic/Targets/SPIR.h:125

Parameters

unsigned int AddressSpace

Returns

Otherwise return None and no conversion will be emitted in the DWARF.

clang::CallingConv getDefaultCallingConv() const

Description

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

Declared at: clang/lib/Basic/Targets/SPIR.h:134

ArrayRef<TargetInfo::GCCRegAlias>
getGCCRegAliases() const

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

ArrayRef<const char*> getGCCRegNames() const

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

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/SPIR.h:105

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/SPIR.h:165

bool hasInt128Type() const

Description

Determine whether the __int128 type is supported on this target.

Declared at: clang/lib/Basic/Targets/SPIR.h:167

void setAddressSpaceMap(bool DefaultIsGeneric)

Declared at: clang/lib/Basic/Targets/SPIR.h:138

Parameters

bool DefaultIsGeneric

void setSupportedOpenCLOpts()

Description

Set supported OpenCL extensions and optional core features.

Declared at: clang/lib/Basic/Targets/SPIR.h:159

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/SPIR.h:103

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

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

Parameters

const char*& Name
TargetInfo::ConstraintInfo& info