9#ifndef LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
10#define LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
15#include "llvm/IR/CallingConv.h"
16#include "llvm/IR/Type.h"
112 uint64_t Members)
const;
119 uint64_t &Members)
const;
129 bool Realign =
false,
130 llvm::Type *Padding =
nullptr)
const;
133 bool Realign =
false)
const;
136 raw_ostream &Out)
const;
138 raw_ostream &Out)
const;
140 raw_ostream &Out)
const;
142 raw_ostream &Out)
const;
147 virtual llvm::FixedVectorType *
160 bool IsNamedArg)
const;
171 unsigned maxAllRegisters)
const;
182 bool AsReturnValue)
const;
187 unsigned NumElts)
const;
C Language Family Type Representation.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Attr - This represents one attribute.
CharUnits - This is an opaque type for sizes expressed in character units.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
const llvm::DataLayout & getDataLayout() const
virtual unsigned getX86ABIAVXLevel(const FunctionDecl *, const FunctionType::ExtInfo &) const
CodeGen::ABIArgInfo getNaturalAlignIndirect(QualType Ty, unsigned AddrSpace, bool ByVal=true, bool Realign=false, llvm::Type *Padding=nullptr) const
A convenience method to return an indirect ABIArgInfo with an expected alignment equal to the ABI ali...
virtual bool allowBFloatArgsAndRet() const
const CodeGenOptions & getCodeGenOpts() const
ABIInfo(CodeGen::CodeGenTypes &cgt)
CodeGen::CodeGenTypes & CGT
bool isHomogeneousAggregate(QualType Ty, const Type *&Base, uint64_t &Members) const
isHomogeneousAggregate - Return true if a type is an ELFv2 homogeneous aggregate.
CodeGen::CGCXXABI & getCXXABI() const
ASTContext & getContext() const
virtual bool isHomogeneousAggregateBaseType(QualType Ty) const
bool isPromotableIntegerTypeForABI(QualType Ty) const
virtual void createCoercedStore(llvm::Value *Val, Address DstAddr, const ABIArgInfo &AI, bool DestIsVolatile, CodeGenFunction &CGF) const
virtual void appendAttributeMangling(TargetAttr *Attr, raw_ostream &Out) const
bool isOHOSFamily() const
virtual RValue EmitMSVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty, AggValueSlot Slot) const
Emit the target dependent code to load a value of.
virtual RValue EmitZOSVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty, AggValueSlot Slot) const
Emit the target dependent code to load a value of.
virtual llvm::Value * createCoercedLoad(Address SrcAddr, const ABIArgInfo &AI, CodeGenFunction &CGF) const
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const
const TargetInfo & getTarget() const
virtual RValue EmitVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty, AggValueSlot Slot) const =0
EmitVAArg - Emit the target dependent code to load a value of.
virtual bool isZeroLengthBitfieldPermittedInHomogeneousAggregate() const
llvm::CallingConv::ID getRuntimeCC() const
Return the calling convention to use for system runtime functions.
virtual ABIArgInfo classifyArgForArm64ECVarArg(QualType Ty, bool IsNamedArg) const
Used by Arm64EC calling convention code to call into x86 calling convention code for varargs function...
CodeGen::ABIArgInfo getNaturalAlignIndirectInReg(QualType Ty, bool Realign=false) const
virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const =0
llvm::CallingConv::ID RuntimeCC
llvm::LLVMContext & getVMContext() const
virtual llvm::FixedVectorType * getOptimalVectorMemoryType(llvm::FixedVectorType *T, const LangOptions &Opt) const
Returns the optimal vector memory type based on the given vector type.
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
Implements C++ ABI-specific code generation functions.
CGFunctionInfo - Class to encapsulate the information about a function definition.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
RValue - This trivial value class is used to represent the result of an expression that is evaluated.
virtual bool isLegalVectorType(CharUnits VectorSize, llvm::Type *EltTy, unsigned NumElts) const
Returns true if the given vector type is legal from Swift's calling convention perspective.
bool occupiesMoreThan(ArrayRef< llvm::Type * > scalarTypes, unsigned maxAllRegisters) const
Does the given lowering require more than the given number of registers when expanded?
bool isSwiftErrorInRegister() const
Returns true if swifterror is lowered to a register by the target ABI.
virtual bool shouldPassIndirectly(ArrayRef< llvm::Type * > ComponentTys, bool AsReturnValue) const
Returns true if an aggregate which expands to the given type sequence should be passed / returned ind...
bool SwiftErrorInRegister
SwiftABIInfo(CodeGen::CodeGenTypes &CGT, bool SwiftErrorInRegister)
Represents a function declaration or definition.
A class which abstracts out some details necessary for making a call.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A (possibly-)qualified type.
Exposes information about the current target.
@ Type
The l-value was considered opaque, so the alignment was determined from a type.
Top level wrappers for InstallAPI frontend operations.
const FunctionProtoType * T
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Diagnostic wrappers for TextAPI types for error reporting.