clang 22.0.0git
clang::CodeGen::ABIInfo Class Referenceabstract

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/ABIInfo.h"

Inheritance diagram for clang::CodeGen::ABIInfo:
[legend]

Public Member Functions

 ABIInfo (CodeGen::CodeGenTypes &cgt)
virtual ~ABIInfo ()
virtual bool allowBFloatArgsAndRet () const
CodeGen::CGCXXABIgetCXXABI () const
ASTContextgetContext () const
llvm::LLVMContext & getVMContext () const
const llvm::DataLayout & getDataLayout () const
const TargetInfogetTarget () const
const CodeGenOptionsgetCodeGenOpts () const
llvm::CallingConv::ID getRuntimeCC () const
 Return the calling convention to use for system runtime functions.
virtual void computeInfo (CodeGen::CGFunctionInfo &FI) const =0
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.
bool isAndroid () 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 bool isHomogeneousAggregateBaseType (QualType Ty) const
virtual bool isHomogeneousAggregateSmallEnough (const Type *Base, uint64_t Members) const
virtual bool isZeroLengthBitfieldPermittedInHomogeneousAggregate () const
bool isHomogeneousAggregate (QualType Ty, const Type *&Base, uint64_t &Members) const
 isHomogeneousAggregate - Return true if a type is an ELFv2 homogeneous aggregate.
bool isPromotableIntegerTypeForABI (QualType Ty) 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 alignment of the given type.
CodeGen::ABIArgInfo getNaturalAlignIndirectInReg (QualType Ty, bool Realign=false) const
virtual void appendAttributeMangling (TargetAttr *Attr, raw_ostream &Out) const
virtual void appendAttributeMangling (TargetVersionAttr *Attr, raw_ostream &Out) const
virtual void appendAttributeMangling (TargetClonesAttr *Attr, unsigned Index, raw_ostream &Out) const
virtual void appendAttributeMangling (StringRef AttrStr, raw_ostream &Out) const
virtual llvm::FixedVectorType * getOptimalVectorMemoryType (llvm::FixedVectorType *T, const LangOptions &Opt) const
 Returns the optimal vector memory type based on the given vector type.
virtual llvm::Value * createCoercedLoad (Address SrcAddr, const ABIArgInfo &AI, CodeGenFunction &CGF) const
virtual void createCoercedStore (llvm::Value *Val, Address DstAddr, const ABIArgInfo &AI, bool DestIsVolatile, CodeGenFunction &CGF) const

Protected Attributes

CodeGen::CodeGenTypesCGT
llvm::CallingConv::ID RuntimeCC

Detailed Description

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.

Definition at line 48 of file ABIInfo.h.

Constructor & Destructor Documentation

◆ ABIInfo()

clang::CodeGen::ABIInfo::ABIInfo ( CodeGen::CodeGenTypes & cgt)
inline

◆ ~ABIInfo()

ABIInfo::~ABIInfo ( )
virtualdefault

Member Function Documentation

◆ allowBFloatArgsAndRet()

virtual bool clang::CodeGen::ABIInfo::allowBFloatArgsAndRet ( ) const
inlinevirtual

Definition at line 59 of file ABIInfo.h.

◆ appendAttributeMangling() [1/4]

void ABIInfo::appendAttributeMangling ( StringRef AttrStr,
raw_ostream & Out ) const
virtual

◆ appendAttributeMangling() [2/4]

void ABIInfo::appendAttributeMangling ( TargetAttr * Attr,
raw_ostream & Out ) const
virtual

◆ appendAttributeMangling() [3/4]

void ABIInfo::appendAttributeMangling ( TargetClonesAttr * Attr,
unsigned Index,
raw_ostream & Out ) const
virtual

Definition at line 198 of file ABIInfo.cpp.

References appendAttributeMangling().

◆ appendAttributeMangling() [4/4]

void ABIInfo::appendAttributeMangling ( TargetVersionAttr * Attr,
raw_ostream & Out ) const
virtual

Definition at line 193 of file ABIInfo.cpp.

References appendAttributeMangling().

◆ computeInfo()

virtual void clang::CodeGen::ABIInfo::computeInfo ( CodeGen::CGFunctionInfo & FI) const
pure virtual

◆ createCoercedLoad()

llvm::Value * ABIInfo::createCoercedLoad ( Address SrcAddr,
const ABIArgInfo & AI,
CodeGenFunction & CGF ) const
virtual

Definition at line 246 of file ABIInfo.cpp.

◆ createCoercedStore()

void ABIInfo::createCoercedStore ( llvm::Value * Val,
Address DstAddr,
const ABIArgInfo & AI,
bool DestIsVolatile,
CodeGenFunction & CGF ) const
virtual

Definition at line 251 of file ABIInfo.cpp.

◆ EmitMSVAArg()

RValue ABIInfo::EmitMSVAArg ( CodeGen::CodeGenFunction & CGF,
CodeGen::Address VAListAddr,
QualType Ty,
AggValueSlot Slot ) const
virtual

Emit the target dependent code to load a value of.

  • Ty from the __builtin_ms_va_list pointed to by
  • VAListAddr.

Definition at line 42 of file ABIInfo.cpp.

References clang::CodeGen::RValue::getIgnored().

◆ EmitVAArg()

virtual RValue clang::CodeGen::ABIInfo::EmitVAArg ( CodeGen::CodeGenFunction & CGF,
CodeGen::Address VAListAddr,
QualType Ty,
AggValueSlot Slot ) const
pure virtual

EmitVAArg - Emit the target dependent code to load a value of.

  • Ty from the va_list pointed to by
  • VAListAddr.

Implemented in clang::CodeGen::DefaultABIInfo.

References clang::T, and clang::CodeGen::Type.

◆ getCodeGenOpts()

const CodeGenOptions & ABIInfo::getCodeGenOpts ( ) const

Definition at line 32 of file ABIInfo.cpp.

References CGT.

◆ getContext()

◆ getCXXABI()

CGCXXABI & ABIInfo::getCXXABI ( ) const

◆ getDataLayout()

const llvm::DataLayout & ABIInfo::getDataLayout ( ) const

◆ getNaturalAlignIndirect()

ABIArgInfo ABIInfo::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 alignment of the given type.

Definition at line 173 of file ABIInfo.cpp.

References getContext(), and clang::CodeGen::ABIArgInfo::getIndirect().

Referenced by clang::CodeGen::DefaultABIInfo::classifyArgumentType(), clang::CodeGen::classifyReturnType(), and clang::CodeGen::DefaultABIInfo::classifyReturnType().

◆ getNaturalAlignIndirectInReg()

ABIArgInfo ABIInfo::getNaturalAlignIndirectInReg ( QualType Ty,
bool Realign = false ) const

Definition at line 180 of file ABIInfo.cpp.

References getContext(), and clang::CodeGen::ABIArgInfo::getIndirectInReg().

◆ getOptimalVectorMemoryType()

llvm::FixedVectorType * ABIInfo::getOptimalVectorMemoryType ( llvm::FixedVectorType * T,
const LangOptions & Opt ) const
virtual

Returns the optimal vector memory type based on the given vector type.

For example, on certain targets, a vector with 3 elements might be promoted to one with 4 elements to improve performance.

Definition at line 239 of file ABIInfo.cpp.

References clang::T.

◆ getRuntimeCC()

llvm::CallingConv::ID clang::CodeGen::ABIInfo::getRuntimeCC ( ) const
inline

Return the calling convention to use for system runtime functions.

Definition at line 70 of file ABIInfo.h.

References RuntimeCC.

◆ getTarget()

const TargetInfo & ABIInfo::getTarget ( ) const

Definition at line 30 of file ABIInfo.cpp.

References CGT.

Referenced by isAndroid(), and isOHOSFamily().

◆ getVMContext()

llvm::LLVMContext & ABIInfo::getVMContext ( ) const

Definition at line 22 of file ABIInfo.cpp.

References CGT.

◆ isAndroid()

bool ABIInfo::isAndroid ( ) const

Definition at line 36 of file ABIInfo.cpp.

References getTarget(), and clang::TargetInfo::getTriple().

◆ isHomogeneousAggregate()

bool ABIInfo::isHomogeneousAggregate ( QualType Ty,
const Type *& Base,
uint64_t & Members ) const

◆ isHomogeneousAggregateBaseType()

bool ABIInfo::isHomogeneousAggregateBaseType ( QualType Ty) const
virtual

Definition at line 47 of file ABIInfo.cpp.

Referenced by isHomogeneousAggregate().

◆ isHomogeneousAggregateSmallEnough()

bool ABIInfo::isHomogeneousAggregateSmallEnough ( const Type * Base,
uint64_t Members ) const
virtual

Definition at line 51 of file ABIInfo.cpp.

References clang::CodeGen::Type.

Referenced by isHomogeneousAggregate().

◆ isOHOSFamily()

bool ABIInfo::isOHOSFamily ( ) const

Definition at line 38 of file ABIInfo.cpp.

References getTarget(), and clang::TargetInfo::getTriple().

◆ isPromotableIntegerTypeForABI()

bool ABIInfo::isPromotableIntegerTypeForABI ( QualType Ty) const

◆ isZeroLengthBitfieldPermittedInHomogeneousAggregate()

bool ABIInfo::isZeroLengthBitfieldPermittedInHomogeneousAggregate ( ) const
virtual

Definition at line 56 of file ABIInfo.cpp.

References getContext(), and clang::ASTContext::getLangOpts().

Referenced by isHomogeneousAggregate().

Member Data Documentation

◆ CGT

◆ RuntimeCC

llvm::CallingConv::ID clang::CodeGen::ABIInfo::RuntimeCC
protected

Definition at line 51 of file ABIInfo.h.

Referenced by ABIInfo(), and getRuntimeCC().


The documentation for this class was generated from the following files: