LLVM 23.0.0git
llvm::abi Namespace Reference

Classes

struct  ABICompatInfo
 Flags controlling target-specific ABI compatibility behaviour. More...
struct  ArgEntry
class  ArgInfo
 Helper class to encapsulate information about how a specific type should be passed to or returned from a function. More...
class  ArrayType
class  BPFTargetInfo
class  ComplexType
struct  FieldInfo
class  FloatType
class  FunctionInfo
class  IntegerType
class  IRTypeMapper
class  MemberPointerType
class  PointerLikeType
class  PointerType
class  RecordType
class  TargetInfo
class  Type
 Represents the ABI-specific view of a type in LLVM. More...
class  TypeBuilder
 TypeBuilder manages the lifecycle of ABI types using bump pointer allocation. More...
class  VectorType
class  VoidType
class  X86_64TargetInfo

Enumerations

enum  RecordArgABI { RAA_Default = 0 , RAA_DirectInMemory , RAA_Indirect }
enum class  X86AVXABILevel { None , AVX , AVX512 }
 The AVX ABI level for X86 targets. More...
enum class  TypeKind {
  Void , MemberPointer , Complex , Integer ,
  Float , Pointer , Array , Vector ,
  Record
}
enum class  StructPacking { Default , Packed , ExplicitPacking }
enum  RecordFlags : unsigned {
  None = 0 , CanPassInRegisters = 1 << 0 , IsUnion = 1 << 1 , IsTransparent = 1 << 2 ,
  IsCXXRecord = 1 << 3 , IsPolymorphic = 1 << 4 , HasFlexibleArrayMember = 1 << 5 , LLVM_MARK_AS_BITMASK_ENUM =( HasFlexibleArrayMember)
}

Functions

LLVM_ABI std::unique_ptr< TargetInfocreateBPFTargetInfo (TypeBuilder &TB)
LLVM_ABI std::unique_ptr< TargetInfocreateX86_64TargetInfo (TypeBuilder &TB, X86AVXABILevel AVXLevel, bool Has64BitPointers, const ABICompatInfo &Compat)
static unsigned getNativeVectorSizeForAVXABI (X86AVXABILevel AVXLevel)
static uint64_t getClangIntegerWidthInBits (const IntegerType *IT)
static uint64_t getClangVectorWidthInBits (const VectorType *VT)
static uint64_t getClangTypeWidthInBits (const Type *Ty)
static const TypereduceUnionForX8664 (const RecordType *UnionType, TypeBuilder &TB)
static bool bitsContainNoUserData (const Type *Ty, unsigned StartBit, unsigned EndBit)
static bool isFloatTypeWithSemantics (const Type *Ty, const fltSemantics &Semantics)
 Helper to check if a floating point type matches specific semantics.
static bool classifyCXXReturnType (FunctionInfo &FI)

Enumeration Type Documentation

◆ RecordArgABI

Enumerator
RAA_Default 

Pass it using the normal C aggregate rules for the ABI, potentially introducing extra copies and passing some or all of it in registers.

RAA_DirectInMemory 

Pass it on the stack using its defined layout.

The argument must be evaluated directly into the correct stack position in the arguments area, and the call machinery must not move it or introduce extra copies.

RAA_Indirect 

Pass it as a pointer to temporary memory.

Definition at line 26 of file TargetInfo.h.

◆ RecordFlags

Enumerator
None 
CanPassInRegisters 
IsUnion 
IsTransparent 
IsCXXRecord 
IsPolymorphic 
HasFlexibleArrayMember 
LLVM_MARK_AS_BITMASK_ENUM 

Definition at line 253 of file Types.h.

◆ StructPacking

enum class llvm::abi::StructPacking
strong
Enumerator
Default 
Packed 
ExplicitPacking 

Definition at line 251 of file Types.h.

◆ TypeKind

enum class llvm::abi::TypeKind
strong
Enumerator
Void 
MemberPointer 
Complex 
Integer 
Float 
Pointer 
Array 
Vector 
Record 

Definition at line 28 of file Types.h.

◆ X86AVXABILevel

enum class llvm::abi::X86AVXABILevel
strong

The AVX ABI level for X86 targets.

Enumerator
None 
AVX 
AVX512 

Definition at line 90 of file TargetInfo.h.

Function Documentation

◆ bitsContainNoUserData()

◆ classifyCXXReturnType()

bool llvm::abi::classifyCXXReturnType ( FunctionInfo & FI)
static

◆ createBPFTargetInfo()

std::unique_ptr< TargetInfo > llvm::abi::createBPFTargetInfo ( TypeBuilder & TB)

Definition at line 84 of file BPF.cpp.

◆ createX86_64TargetInfo()

std::unique_ptr< TargetInfo > llvm::abi::createX86_64TargetInfo ( TypeBuilder & TB,
X86AVXABILevel AVXLevel,
bool Has64BitPointers,
const ABICompatInfo & Compat )

Definition at line 1494 of file X86.cpp.

◆ getClangIntegerWidthInBits()

uint64_t llvm::abi::getClangIntegerWidthInBits ( const IntegerType * IT)
static

Definition at line 40 of file X86.cpp.

References llvm::alignTo(), llvm::bit_ceil(), and IT.

Referenced by getClangTypeWidthInBits(), and getClangVectorWidthInBits().

◆ getClangTypeWidthInBits()

uint64_t llvm::abi::getClangTypeWidthInBits ( const Type * Ty)
static

◆ getClangVectorWidthInBits()

◆ getNativeVectorSizeForAVXABI()

unsigned llvm::abi::getNativeVectorSizeForAVXABI ( X86AVXABILevel AVXLevel)
static

Definition at line 24 of file X86.cpp.

References AVX, AVX512, llvm_unreachable, and None.

◆ isFloatTypeWithSemantics()

bool llvm::abi::isFloatTypeWithSemantics ( const Type * Ty,
const fltSemantics & Semantics )
static

Helper to check if a floating point type matches specific semantics.

Definition at line 1156 of file X86.cpp.

References llvm::cast(), and llvm::abi::FloatType::getSemantics().

◆ reduceUnionForX8664()