|
LLVM 24.0.0git
|
#include "llvm/ABI/TargetInfo.h"
Public Member Functions | |
| TargetInfo (TypeBuilder &Builder) | |
| virtual | ~TargetInfo ()=default |
| virtual void | computeInfo (FunctionInfo &FI) const =0 |
| Populate FI with the target's ABI-lowering decisions for each argument and return value. | |
| virtual bool | isPassByRef (const Type *Ty) const |
| virtual const ABICompatInfo & | getABICompatInfo () const =0 |
| Return this target's ABI compatibility flags. | |
Protected Member Functions | |
| LLVM_ABI RecordArgABI | getRecordArgABI (const RecordType *RT) const |
| LLVM_ABI RecordArgABI | getRecordArgABI (const Type *Ty) const |
| LLVM_ABI bool | isPromotableInteger (const IntegerType *IT) const |
| LLVM_ABI ArgInfo | getNaturalAlignIndirect (const Type *Ty, bool ByVal=true) const |
| 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 bool | maybeCommonClassifyReturnType (FunctionInfo &FI) const |
| Apply rules for classifying return types that are common to all targets. | |
| virtual bool | isHomogeneousAggregateBaseType (const Type *Ty) const |
Return true if Ty is a valid base type for a homogeneous aggregate. | |
| 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 registers for this ABI. | |
| virtual bool | isZeroLengthBitfieldPermittedInHomogeneousAggregate () const |
| Return true if zero-length bitfields should be ignored when deciding whether an aggregate is homogeneous. | |
| virtual bool | isPermittedToBeHomogeneousAggregate (const RecordType *RT) const |
Return true if the C++ ABI permits RT to be a homogeneous aggregate. | |
| LLVM_ABI bool | isHomogeneousAggregate (const Type *Ty, const Type *&Base, uint64_t &Members) const |
Return true if Ty is an ELFv2-style homogeneous aggregate. | |
Protected Attributes | |
| TypeBuilder & | TB |
Definition at line 65 of file TargetInfo.h.
|
inlineexplicit |
Definition at line 70 of file TargetInfo.h.
References TB.
Referenced by llvm::abi::AArch64TargetInfo::AArch64TargetInfo(), llvm::abi::BPFTargetInfo::BPFTargetInfo(), and llvm::abi::X86_64TargetInfo::X86_64TargetInfo().
|
virtualdefault |
|
pure virtual |
Populate FI with the target's ABI-lowering decisions for each argument and return value.
Implemented in llvm::abi::AArch64TargetInfo, and llvm::abi::BPFTargetInfo.
|
pure virtual |
Return this target's ABI compatibility flags.
Targets with extra flags store a derived object and return that as an ABICompatInfo reference.
Implemented in llvm::abi::AArch64TargetInfo, llvm::abi::BPFTargetInfo, and llvm::abi::X86_64TargetInfo.
Referenced by isHomogeneousAggregate().
Definition at line 44 of file TargetInfo.cpp.
References llvm::abi::ArgInfo::getIndirect().
|
protected |
Definition at line 48 of file TargetInfo.cpp.
References llvm::abi::RecordType::canPassInRegisters(), llvm::abi::RAA_Default, and llvm::abi::RAA_Indirect.
Referenced by getRecordArgABI().
|
protected |
Definition at line 54 of file TargetInfo.cpp.
References llvm::dyn_cast(), getRecordArgABI(), and llvm::abi::RAA_Default.
Definition at line 17 of file TargetInfo.cpp.
References llvm::dyn_cast(), and isAggregateTypeForABI().
Referenced by isAggregateTypeForABI().
|
protected |
Return true if Ty is an ELFv2-style homogeneous aggregate.
Base is set to the base element type and Members to the number of base elements.
Definition at line 103 of file TargetInfo.cpp.
References assert(), llvm::sampleprof::Base, llvm::dyn_cast(), getABICompatInfo(), llvm::ElementCount::getFixed(), isHomogeneousAggregate(), isHomogeneousAggregateBaseType(), isHomogeneousAggregateSmallEnough(), llvm::abi::ABICompatInfo::IsMatrixHA, isPermittedToBeHomogeneousAggregate(), isZeroLengthBitfieldPermittedInHomogeneousAggregate(), and TB.
Referenced by isHomogeneousAggregate().
|
inlineprotectedvirtual |
Return true if Ty is a valid base type for a homogeneous aggregate.
Definition at line 99 of file TargetInfo.h.
Referenced by isHomogeneousAggregate().
|
inlineprotectedvirtual |
Return true if a homogeneous aggregate with Members copies of Base is small enough to be passed in registers for this ABI.
Definition at line 105 of file TargetInfo.h.
References llvm::sampleprof::Base, and uint64_t.
Referenced by isHomogeneousAggregate().
Definition at line 77 of file TargetInfo.h.
|
inlineprotectedvirtual |
Return true if the C++ ABI permits RT to be a homogeneous aggregate.
Definition at line 117 of file TargetInfo.h.
Referenced by isHomogeneousAggregate().
|
protected |
Definition at line 37 of file TargetInfo.cpp.
References llvm::BitWidth, and IT.
|
inlineprotectedvirtual |
Return true if zero-length bitfields should be ignored when deciding whether an aggregate is homogeneous.
Definition at line 112 of file TargetInfo.h.
Referenced by isHomogeneousAggregate().
|
protected |
Apply rules for classifying return types that are common to all targets.
Definition at line 74 of file TargetInfo.cpp.
References llvm::dyn_cast(), llvm::abi::ArgInfo::getIndirect(), llvm::abi::FunctionInfo::getReturnInfo(), and llvm::abi::FunctionInfo::getReturnType().
Referenced by llvm::abi::AArch64TargetInfo::computeInfo().
If Ty is a transparent union, return its first field type; otherwise return Ty unchanged.
Definition at line 63 of file TargetInfo.cpp.
References assert(), and llvm::dyn_cast().
|
protected |
Definition at line 67 of file TargetInfo.h.
Referenced by llvm::abi::AArch64TargetInfo::AArch64TargetInfo(), isHomogeneousAggregate(), and TargetInfo().