14#ifndef LLVM_ABI_TARGETINFO_H
15#define LLVM_ABI_TARGETINFO_H
88 bool ByVal =
true)
const;
140 bool Has64BitPointers,
const X86ABICompatInfo &Compat);
static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate any type of IT block"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow complex IT blocks")))
Helper class to encapsulate information about how a specific type should be passed to or returned fro...
LLVM_ABI ArgInfo getNaturalAlignIndirect(const Type *Ty, bool ByVal=true) const
virtual bool isPermittedToBeHomogeneousAggregate(const RecordType *RT) const
Return true if the C++ ABI permits RT to be a homogeneous aggregate.
virtual const ABICompatInfo & getABICompatInfo() const =0
Return this target's ABI compatibility flags.
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const
Return true if a homogeneous aggregate with Members copies of Base is small enough to be passed in re...
virtual void computeInfo(FunctionInfo &FI) const =0
Populate FI with the target's ABI-lowering decisions for each argument and return value.
LLVM_ABI bool isHomogeneousAggregate(const Type *Ty, const Type *&Base, uint64_t &Members) const
Return true if Ty is an ELFv2-style homogeneous aggregate.
LLVM_ABI bool isPromotableInteger(const IntegerType *IT) const
virtual ~TargetInfo()=default
virtual bool isZeroLengthBitfieldPermittedInHomogeneousAggregate() const
Return true if zero-length bitfields should be ignored when deciding whether an aggregate is homogene...
virtual bool isPassByRef(const Type *Ty) const
TargetInfo(TypeBuilder &Builder)
virtual bool isHomogeneousAggregateBaseType(const Type *Ty) const
Return true if Ty is a valid base type for a homogeneous aggregate.
LLVM_ABI bool maybeCommonClassifyReturnType(FunctionInfo &FI) const
Apply rules for classifying return types that are common to all targets.
LLVM_ABI bool isAggregateTypeForABI(const Type *Ty) const
LLVM_ABI const Type * useFirstFieldIfTransparentUnion(const Type *Ty) const
If Ty is a transparent union, return its first field type; otherwise return Ty unchanged.
LLVM_ABI RecordArgABI getRecordArgABI(const RecordType *RT) const
TypeBuilder manages the lifecycle of ABI types using bump pointer allocation.
Represents the ABI-specific view of a type in LLVM.
This file defines the type system for the LLVMABI library, which mirrors ABI-relevant aspects of fron...
LLVM_ABI std::unique_ptr< TargetInfo > createBPFTargetInfo(TypeBuilder &TB)
LLVM_ABI std::unique_ptr< TargetInfo > createX86_64TargetInfo(TypeBuilder &TB, X86AVXABILevel AVXLevel, bool Has64BitPointers, const X86ABICompatInfo &Compat)
X86AVXABILevel
The AVX ABI level for X86 targets.
@ RAA_Indirect
Pass it as a pointer to temporary memory.
@ RAA_DirectInMemory
Pass it on the stack using its defined layout.
@ RAA_Default
Pass it using the normal C aggregate rules for the ABI, potentially introducing extra copies and pass...
LLVM_ABI std::unique_ptr< TargetInfo > createAArch64TargetInfo(TypeBuilder &TB, const AArch64ABIOptions &Opts)
This is an optimization pass for GlobalISel generic memory operations.
AArch64ABIOptions(AArch64ABIKind Kind)
AArch64ABIOptions()=default
Flags controlling ABI compatibility behaviour that applies to every target.
bool IsMatrixHA
Whether a matrix type may be the base type of a homogeneous aggregate.
bool ClassifyIntegerMMXAsSSE
bool PassInt128VectorsInMem
bool ClassifyUnnamedBitFields
bool ReturnCXXRecordGreaterThan128InMem