21 : TB(TB), Kind(Kind) {}
29 unsigned NSRN = 0, NPRN = 0;
31 const bool IsNamedArg =
34 I.Info = classifyArgumentType(
I.ABIType, FI.
isVariadic(), IsNamedArg,
43 ArgInfo classifyReturnType(
const Type *RetTy,
bool IsVariadicFn)
const;
44 ArgInfo classifyArgumentType(
const Type *Ty,
bool IsVariadicFn,
45 bool IsNamedArg,
unsigned CallingConvention,
46 unsigned &NSRN,
unsigned &NPRN)
const;
49 bool passAsAggregateType(
const Type *Ty)
const;
54 return std::make_unique<AArch64TargetInfo>(TB, Kind);
60 <<
" is not yet implemented for AArch64 in the LLVM ABI library.\n";
63ArgInfo AArch64TargetInfo::classifyReturnType(
const Type *RetTy,
64 bool IsVariadicFn)
const {
68 if (RetTy->isVector()) {
73 if (!passAsAggregateType(RetTy)) {
75 if (IntTy->isBitInt()) {
88 reportNYI(
"Aggregate return type handling");
92ArgInfo AArch64TargetInfo::classifyArgumentType(
93 const Type *Ty,
bool IsVariadicFn,
bool IsNamedArg,
94 unsigned CallingConvention,
unsigned &NSRN,
unsigned &NPRN)
const {
100 reportNYI(
"Vector argument type handling");
104 if (!passAsAggregateType(Ty)) {
106 if (IntTy->isBitInt()) {
107 reportNYI(
"BitInt argument type handling");
118 NSRN = std::min(NSRN + 1, 8u);
124 reportNYI(
"Aggregate argument type handling");
128bool AArch64TargetInfo::passAsAggregateType(
const Type *Ty)
const {
Target-specific ABI information and factory functions.
Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI raw_ostream & warning()
Convenience method for printing "warning: " to stderr.
AArch64TargetInfo(TypeBuilder &TB, AArch64ABIKind Kind)
void computeInfo(FunctionInfo &FI) const override
Populate FI with the target's ABI-lowering decisions for each argument and return value.
Helper class to encapsulate information about how a specific type should be passed to or returned fro...
static ArgInfo getDirect(const Type *T=nullptr, unsigned Offset=0, MaybeAlign Align=std::nullopt)
static ArgInfo getIgnore()
static ArgInfo getExtend(const Type *T)
ArrayRef< ArgEntry > arguments() const
unsigned getNumRequiredArgs() const
CallingConv::ID getCallingConvention() const
ArgInfo & getReturnInfo()
const Type * getReturnType() const
LLVM_ABI bool isPromotableInteger(const IntegerType *IT) const
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.
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...
static void reportNYI(StringRef Feature)
LLVM_ABI std::unique_ptr< TargetInfo > createAArch64TargetInfo(TypeBuilder &TB, AArch64ABIKind Kind)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Helper struct shared between Function Specialization and SCCP Solver.