clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::CodeGen::CodeGenTypeCache Struct Reference

This structure provides a set of types that are commonly used during IR emission. More...

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

Inheritance diagram for clang::CodeGen::CodeGenTypeCache:
Inheritance graph
[legend]

Public Member Functions

CharUnits getIntSize () const
 
CharUnits getIntAlign () const
 
CharUnits getSizeSize () const
 
CharUnits getSizeAlign () const
 
CharUnits getPointerSize () const
 
CharUnits getPointerAlign () const
 
llvm::CallingConv::ID getRuntimeCC () const
 
LangAS getASTAllocaAddressSpace () const
 

Public Attributes

llvm::Type * VoidTy
 void
 
llvm::IntegerType * Int8Ty
 i8, i16, i32, and i64
 
llvm::IntegerType * Int16Ty
 
llvm::IntegerType * Int32Ty
 
llvm::IntegerType * Int64Ty
 
llvm::Type * HalfTy
 half, bfloat, float, double
 
llvm::Type * BFloatTy
 
llvm::Type * FloatTy
 
llvm::Type * DoubleTy
 
llvm::IntegerType * IntTy
 int
 
llvm::IntegerType * CharTy
 char
 
union {
   llvm::IntegerType *   IntPtrTy
 
   llvm::IntegerType *   SizeTy
 
   llvm::IntegerType *   PtrDiffTy
 
}; 
 intptr_t, size_t, and ptrdiff_t, which we assume are the same size.
 
union {
   llvm::PointerType *   UnqualPtrTy
 
   llvm::PointerType *   VoidPtrTy
 
   llvm::PointerType *   Int8PtrTy
 
   llvm::PointerType *   VoidPtrPtrTy
 
   llvm::PointerType *   Int8PtrPtrTy
 
}; 
 void*, void** in the target's default address space (often 0)
 
union {
   llvm::PointerType *   AllocaVoidPtrTy
 
   llvm::PointerType *   AllocaInt8PtrTy
 
}; 
 void* in alloca address space
 
union {
   llvm::PointerType *   GlobalsVoidPtrTy
 
   llvm::PointerType *   GlobalsInt8PtrTy
 
}; 
 void* in default globals address space
 
llvm::PointerType * ConstGlobalsPtrTy
 void* in the address space for constant globals
 
union {
   unsigned char   IntSizeInBytes
 
   unsigned char   IntAlignInBytes
 
}; 
 The size and alignment of the builtin C type 'int'.
 
unsigned char PointerWidthInBits
 The width of a pointer into the generic address space.
 
union {
   unsigned char   PointerAlignInBytes
 
   unsigned char   PointerSizeInBytes
 
}; 
 The size and alignment of a pointer into the generic address space.
 
union {
   unsigned char   SizeSizeInBytes
 
   unsigned char   SizeAlignInBytes
 
}; 
 The size and alignment of size_t.
 
LangAS ASTAllocaAddressSpace
 
llvm::CallingConv::ID RuntimeCC
 

Detailed Description

This structure provides a set of types that are commonly used during IR emission.

It's initialized once in CodeGenModule's constructor and then copied around into new CodeGenFunctions.

Definition at line 32 of file CodeGenTypeCache.h.

Member Function Documentation

◆ getASTAllocaAddressSpace()

LangAS clang::CodeGen::CodeGenTypeCache::getASTAllocaAddressSpace ( ) const
inline

Definition at line 124 of file CodeGenTypeCache.h.

References ASTAllocaAddressSpace.

◆ getIntAlign()

CharUnits clang::CodeGen::CodeGenTypeCache::getIntAlign ( ) const
inline

◆ getIntSize()

CharUnits clang::CodeGen::CodeGenTypeCache::getIntSize ( ) const
inline

Definition at line 84 of file CodeGenTypeCache.h.

References clang::CharUnits::fromQuantity(), and IntSizeInBytes.

Referenced by initializeForBlockHeader().

◆ getPointerAlign()

CharUnits clang::CodeGen::CodeGenTypeCache::getPointerAlign ( ) const
inline

◆ getPointerSize()

CharUnits clang::CodeGen::CodeGenTypeCache::getPointerSize ( ) const
inline

◆ getRuntimeCC()

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

◆ getSizeAlign()

CharUnits clang::CodeGen::CodeGenTypeCache::getSizeAlign ( ) const
inline

Definition at line 111 of file CodeGenTypeCache.h.

References clang::CharUnits::fromQuantity(), and SizeAlignInBytes.

◆ getSizeSize()

CharUnits clang::CodeGen::CodeGenTypeCache::getSizeSize ( ) const
inline

Definition at line 108 of file CodeGenTypeCache.h.

References clang::CharUnits::fromQuantity(), and SizeSizeInBytes.

Member Data Documentation

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@329

intptr_t, size_t, and ptrdiff_t, which we assume are the same size.

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@331

void*, void** in the target's default address space (often 0)

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@333

void* in alloca address space

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@335

void* in default globals address space

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@337

The size and alignment of the builtin C type 'int'.

This comes up enough in various ABI lowering tasks to be worth pre-computing.

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@339

The size and alignment of a pointer into the generic address space.

◆ 

union { ... } clang::CodeGen::CodeGenTypeCache::@341

The size and alignment of size_t.

◆ AllocaInt8PtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy

◆ AllocaVoidPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::AllocaVoidPtrTy

Definition at line 65 of file CodeGenTypeCache.h.

◆ ASTAllocaAddressSpace

LangAS clang::CodeGen::CodeGenTypeCache::ASTAllocaAddressSpace

◆ BFloatTy

llvm::Type * clang::CodeGen::CodeGenTypeCache::BFloatTy

Definition at line 39 of file CodeGenTypeCache.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), and GetNeonType().

◆ CharTy

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::CharTy

◆ ConstGlobalsPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy

◆ DoubleTy

llvm::Type * clang::CodeGen::CodeGenTypeCache::DoubleTy

◆ FloatTy

llvm::Type * clang::CodeGen::CodeGenTypeCache::FloatTy

◆ GlobalsInt8PtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::GlobalsInt8PtrTy

◆ GlobalsVoidPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::GlobalsVoidPtrTy

Definition at line 71 of file CodeGenTypeCache.h.

◆ HalfTy

llvm::Type* clang::CodeGen::CodeGenTypeCache::HalfTy

half, bfloat, float, double

Definition at line 39 of file CodeGenTypeCache.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), GetFloatNeonType(), and GetNeonType().

◆ Int16Ty

llvm::IntegerType * clang::CodeGen::CodeGenTypeCache::Int16Ty

◆ Int32Ty

llvm::IntegerType * clang::CodeGen::CodeGenTypeCache::Int32Ty

Definition at line 37 of file CodeGenTypeCache.h.

Referenced by AddRelativeLayoutOffset(), ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), clang::CodeGen::CodeGenModule::CodeGenModule(), clang::CodeGen::CodeGenModule::CreateKCFITypeId(), EmitAMDGCNBallotForExec(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), emitClauseForBareTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), emitDynCGGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), emitIsPlatformVersionAtLeast(), clang::CodeGen::CGOpenMPRuntime::emitMaskedRegion(), EmitMSVCRTSetJmp(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitPPCLoadReserveIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), clang::CodeGen::CodeGenVTables::EmitVTTDefinition(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CodeGenModule::GetAddrOfMSGuidDecl(), clang::CodeGen::CodeGenModule::getConstantSignedPointer(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), clang::CodeGen::CGOpenMPRuntime::getKmpc_MicroPointerTy(), GetNeonType(), getPersonalityFn(), clang::CodeGen::TargetCodeGenInfo::getUBSanFunctionSignature(), clang::CodeGen::CodeGenModule::getVTableComponentType(), handleHlslSplitdouble(), performTypeAdjustment(), clang::CodeGen::CodeGenModule::Release(), and clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt().

◆ Int64Ty

llvm::IntegerType * clang::CodeGen::CodeGenTypeCache::Int64Ty

◆ Int8PtrPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy

◆ Int8PtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::Int8PtrTy

◆ Int8Ty

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::Int8Ty

i8, i16, i32, and i64

Definition at line 37 of file CodeGenTypeCache.h.

Referenced by ApplyNonVirtualAndVirtualOffset(), CheckAggExprForMemSetUse(), clang::CodeGen::CodeGenModule::CodeGenModule(), complexTempStructure(), computeBlockInfo(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), createUnnamedGlobalForMemcpyFrom(), emitAddressAtOffset(), emitAddrOfZeroSizeField(), EmitAtomicCmpXchg128ForMSIntrin(), EmitBitTestIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::ConstantEmitter::emitForMemory(), emitGlobalDtorWithCXAAtExit(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), emitPointerArithmetic(), emitPPCLoadReserveIntrinsic(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitStoresForConstant(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), emitTlsGuardCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::emitVoidPtrDirectVAArg(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), clang::CodeGen::CodeGenModule::GetAddrOfMSGuidDecl(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::ConstantEmitter::getCurrentAddrPrivate(), GetNeonType(), clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem(), InitCatchParam(), performTypeAdjustment(), PPC_initDwarfEHRegSizeTable(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), and clang::CodeGen::CodeGenModule::Release().

◆ IntAlignInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::IntAlignInBytes

Definition at line 82 of file CodeGenTypeCache.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), and getIntAlign().

◆ IntPtrTy

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::IntPtrTy

◆ IntSizeInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::IntSizeInBytes

Definition at line 81 of file CodeGenTypeCache.h.

Referenced by getIntSize().

◆ IntTy

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::IntTy

◆ PointerAlignInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes

◆ PointerSizeInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::PointerSizeInBytes

Definition at line 97 of file CodeGenTypeCache.h.

Referenced by getMaxAtomicAccessSize(), and getPointerSize().

◆ PointerWidthInBits

unsigned char clang::CodeGen::CodeGenTypeCache::PointerWidthInBits

The width of a pointer into the generic address space.

Definition at line 92 of file CodeGenTypeCache.h.

Referenced by clang::CodeGen::CodeGenModule::CodeGenModule(), and clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable().

◆ PtrDiffTy

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::PtrDiffTy

◆ RuntimeCC

llvm::CallingConv::ID clang::CodeGen::CodeGenTypeCache::RuntimeCC

◆ SizeAlignInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::SizeAlignInBytes

Definition at line 103 of file CodeGenTypeCache.h.

Referenced by getSizeAlign().

◆ SizeSizeInBytes

unsigned char clang::CodeGen::CodeGenTypeCache::SizeSizeInBytes

◆ SizeTy

llvm::IntegerType* clang::CodeGen::CodeGenTypeCache::SizeTy

◆ UnqualPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::UnqualPtrTy

◆ VoidPtrPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::VoidPtrPtrTy

◆ VoidPtrTy

llvm::PointerType* clang::CodeGen::CodeGenTypeCache::VoidPtrTy

Definition at line 57 of file CodeGenTypeCache.h.

Referenced by buildBlockDescriptor(), computeBlockInfo(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), emitCatchDispatchBlock(), emitCatchPadBlock(), clang::CodeGen::CGOpenMPRuntime::emitDeclareTargetFunction(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), emitWasmCatchPadBlock(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CodeGenModule::getGenericBlockLiteralType(), clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem(), and initializeForBlockHeader().

◆ VoidTy

llvm::Type* clang::CodeGen::CodeGenTypeCache::VoidTy

The documentation for this struct was generated from the following file: