class PPCTargetInfo

Declaration

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

Description

Exposes information about the current target.

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

Inherits from: TargetInfo

Member Variables

private clang::targets::PPCTargetInfo::ArchDefineTypes ArchDefs = ArchDefineNone
private std::string CPU
private enum PPCFloatABI FloatABI
private bool HasAltivec = false
private bool HasMMA = false
private bool HasROPProtect = false
private bool HasPrivileged = false
private bool HasVSX = false
private bool UseCRBits = false
private bool HasP8Vector = false
private bool HasP8Crypto = false
private bool HasDirectMove = false
private bool HasHTM = false
private bool HasBPERMD = false
private bool HasExtDiv = false
private bool HasP9Vector = false
private bool HasSPE = false
private bool PairedVectorMemops = false
private bool HasP10Vector = false
private bool HasPCRelativeMemops = false
private bool HasPrefixInstrs = false
private bool IsISA2_06 = false
private bool IsISA2_07 = false
private bool IsISA3_0 = false
private bool IsISA3_1 = false
private bool HasQuadwordAtomics = false
protected std::string ABI
private static const Builtin::Info[] BuiltinInfo
private static const char* const[] GCCRegNames
private static const TargetInfo::GCCRegAlias[] GCCRegAliases

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

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

Declared at: clang/lib/Basic/Targets/PPC.h:88

Parameters

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

void addFutureSpecificFeatures(
    llvm::StringMap<bool>& Features) const

Declared at: clang/lib/Basic/Targets/PPC.h:192

Parameters

llvm::StringMap<bool>& Features

void addP10SpecificFeatures(
    llvm::StringMap<bool>& Features) const

Declared at: clang/lib/Basic/Targets/PPC.h:191

Parameters

llvm::StringMap<bool>& Features

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/PPC.h:99

Parameters

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

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

Declared at: clang/lib/Basic/Targets/PPC.h:320

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

Parameters

SmallVectorImpl<llvm::StringRef>& Values

llvm::StringRef getABI() const

Description

Get the ABI currently in use.

Declared at: clang/lib/Basic/Targets/PPC.h:177

const char* getClobbers() const

Description

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

Declared at: clang/lib/Basic/Targets/PPC.h:335

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/PPC.h:336

Parameters

unsigned int RegNo

const char* getFloat128Mangling() const

Description

Return the mangled code of __float128.

Declared at: clang/lib/Basic/Targets/PPC.h:353

ArrayRef<TargetInfo::AddlRegName>
getGCCAddlRegNames() const

Declared at: clang/lib/Basic/Targets/PPC.h:206

ArrayRef<TargetInfo::GCCRegAlias>
getGCCRegAliases() const

Declared at: clang/lib/Basic/Targets/PPC.h:204

ArrayRef<const char*> getGCCRegNames() const

Declared at: clang/lib/Basic/Targets/PPC.h:202

const char* getIbm128Mangling() const

Description

Return the mangled code of __ibm128.

Declared at: clang/lib/Basic/Targets/PPC.h:354

const char* getLongDoubleMangling() const

Description

Return the mangled code of long double.

Declared at: clang/lib/Basic/Targets/PPC.h:346

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/PPC.h:179

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

Description

PPCTargetInfo::getTargetDefines - Return a set of the PowerPC-specific #defines that are not tied to a specific subtarget.

Declared at: clang/lib/Basic/Targets/PPC.h:183

Parameters

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

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

Description

handleTargetFeatures - Perform initialization based on the user configured set of features.

Declared at: clang/lib/Basic/Targets/PPC.h:194

Parameters

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

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/PPC.h:356

bool hasFeature(llvm::StringRef Feature) const

Description

Determine whether the given target has the given feature.

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

Parameters

llvm::StringRef Feature

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/PPC.h:344

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/PPC.h:187

Parameters

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

Returns

False on error (invalid features).

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/PPC.h:181

bool isSPRegName(llvm::StringRef RegName) const

Declared at: clang/lib/Basic/Targets/PPC.h:358

Parameters

llvm::StringRef RegName

bool isValidCPUName(llvm::StringRef Name) const

Description

brief Determine whether this TargetInfo supports the given CPU name.

Declared at: clang/lib/Basic/Targets/PPC.h:104

Parameters

llvm::StringRef Name

bool setCPU(const std::string& Name)

Description

Target the specified CPU.

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

Parameters

const std::string& Name

Returns

False on error (invalid CPU name).

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

Description

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

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

Parameters

llvm::StringMap<bool>& Features
llvm::StringRef Name
bool Enabled

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

Declared at: clang/lib/Basic/Targets/PPC.h:208

Parameters

const char*& Name
TargetInfo::ConstraintInfo& Info