clang 19.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 address space 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::@309

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

◆ 

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

void*, void** in address space 0

◆ 

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

void* in alloca address space

◆ 

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

void* in default globals address space

◆ 

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

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::@319

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

◆ 

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

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(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), emitDynCGGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), emitInterWarpCopyFunction(), 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::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), 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::getBlockObjectAssign(), clang::CodeGen::CodeGenModule::getBlockObjectDispose(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), clang::CodeGen::CGOpenMPRuntime::getKmpc_MicroPointerTy(), GetNeonType(), getPersonalityFn(), clang::CodeGen::TargetCodeGenInfo::getUBSanFunctionSignature(), clang::CodeGen::CodeGenModule::getVTableComponentType(), 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::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(), clang::CodeGen::CodeGenModule::Release(), and shuffleAndStore().

◆ 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(), 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(), emitGlobalToListReduceFunction(), emitListToGlobalReduceFunction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), emitShuffleAndReduceFunction(), 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::emitThreadPrivateVarDefinition(), 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(), initializeForBlockHeader(), and shuffleAndStore().

◆ VoidTy

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

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