clang 19.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
clang::CodeGen::Address Class Reference

An aligned address. More...

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

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

Public Member Functions

 Address (llvm::Value *Pointer, llvm::Type *ElementType, CharUnits Alignment, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 
bool isValid () const
 
llvm::Value * getPointer () const
 
llvm::PointerType * getType () const
 Return the type of the pointer value.
 
llvm::Type * getElementType () const
 Return the type of the values stored in this address.
 
unsigned getAddressSpace () const
 Return the address space that this address resides in.
 
llvm::StringRef getName () const
 Return the IR name of the pointer value.
 
CharUnits getAlignment () const
 Return the alignment of this pointer.
 
Address withPointer (llvm::Value *NewPointer, KnownNonNull_t IsKnownNonNull) const
 Return address with different pointer, but same element type and alignment.
 
Address withAlignment (CharUnits NewAlignment) const
 Return address with different alignment, but same pointer and element type.
 
Address withElementType (llvm::Type *ElemTy) const
 Return address with different element type, but same pointer and alignment.
 
KnownNonNull_t isKnownNonNull () const
 Whether the pointer is known not to be null.
 
Address setKnownNonNull ()
 Set the non-null bit.
 

Static Public Member Functions

static Address invalid ()
 

Protected Member Functions

 Address (std::nullptr_t)
 

Detailed Description

An aligned address.

Definition at line 29 of file Address.h.

Constructor & Destructor Documentation

◆ Address() [1/2]

clang::CodeGen::Address::Address ( std::nullptr_t  )
inlineprotected

Definition at line 35 of file Address.h.

◆ Address() [2/2]

clang::CodeGen::Address::Address ( llvm::Value *  Pointer,
llvm::Type *  ElementType,
CharUnits  Alignment,
KnownNonNull_t  IsKnownNonNull = NotKnownNonNull 
)
inline

Definition at line 38 of file Address.h.

References Pointer.

Member Function Documentation

◆ getAddressSpace()

unsigned clang::CodeGen::Address::getAddressSpace ( ) const
inline

Return the address space that this address resides in.

Definition at line 68 of file Address.h.

References getType().

◆ getAlignment()

CharUnits clang::CodeGen::Address::getAlignment ( ) const
inline

Return the alignment of this pointer.

Definition at line 78 of file Address.h.

References isValid().

Referenced by ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::ConstantAddress::castImpl(), CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP2_32(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemCpyInline(), clang::CodeGen::CGBuilderTy::CreateMemMove(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreateMemSetInline(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStore(), createStoreInstBefore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope(), EmitArrayDelete(), emitArraySubscriptGEP(), emitGlobalToListCopyFunction(), emitListToGlobalCopyFunction(), clang::CodeGen::emitMergePHI(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitStoresForConstant(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::AggValueSlot::getAlignment(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeMatrixElt(), clang::CodeGen::LValue::MakeVectorElt(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::EHCleanupScope::setActiveFlag(), clang::CodeGen::LValue::setAddress(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), shuffleAndStore(), withElementType(), clang::CodeGen::ConstantAddress::withElementType(), withPointer(), and wrapWithBPFPreserveStaticOffset().

◆ getElementType()

llvm::Type * clang::CodeGen::Address::getElementType ( ) const
inline

Return the type of the values stored in this address.

Definition at line 62 of file Address.h.

References isValid().

Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::ConstantAddress::castImpl(), castToBase(), CheckAtomicAlignment(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP2_32(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), emitARCStoreOperation(), EmitArrayDelete(), emitArraySubscriptGEP(), EmitCheckedMixedSignMultiply(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::emitMergePHI(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), emitOMPAtomicCompareExpr(), EmitPointerWithAlignment(), emitStoresForPatternInit(), emitStoresForZeroInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::emitVoidPtrDirectVAArg(), emitWriteback(), EnterStructPointerForCoercedAccess(), findDominatingStoreToReturnValue(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::RValue::getAggregate(), getNullForVariable(), getPointerAndSize(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeMatrixElt(), clang::CodeGen::LValue::MakeVectorElt(), MaybeConvertMatrixAddress(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::LValue::setAddress(), shuffleAndStore(), tryEmitARCCopyWeakInit(), withAlignment(), withPointer(), and wrapWithBPFPreserveStaticOffset().

◆ getName()

llvm::StringRef clang::CodeGen::Address::getName ( ) const
inline

Return the IR name of the pointer value.

Definition at line 73 of file Address.h.

References getPointer().

Referenced by CreateCoercedLoad().

◆ getPointer()

llvm::Value * clang::CodeGen::Address::getPointer ( ) const
inline

Definition at line 51 of file Address.h.

References isValid().

Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CGObjCRuntime::canMessageReceiverBeNull(), clang::CodeGen::ConstantAddress::castImpl(), castToBase(), castValueFromUintptr(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP2_32(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), clang::CodeGen::CGBuilderTy::CreateLoad(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemCpyInline(), clang::CodeGen::CGBuilderTy::CreateMemMove(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreateMemSetInline(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStore(), createStoreInstBefore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope(), destroyOptimisticNormalEntry(), emitARCCopyOperation(), emitARCLoadOperation(), emitARCStoreOperation(), EmitArrayDelete(), emitArraySubscriptGEP(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitDestroyingObjectDelete(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitForStaticInitCall(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), clang::CodeGen::CodeGenPGO::emitMCDCCondBitmapUpdate(), clang::CodeGen::CodeGenPGO::emitMCDCTestVectorBitmapUpdate(), clang::CodeGen::emitMergePHI(), emitNonZeroVLAInit(), EmitObjectDelete(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPAtomicCompareExpr(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitPointerWithAlignment(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitStructGetterCall(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::emitVoidPtrDirectVAArg(), emitWriteback(), emitWritebackArg(), EnterNewDeleteCleanup(), findDominatingStoreToReturnValue(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::RValue::getAggregate(), getName(), clang::CodeGen::ConstantAddress::getPointer(), clang::CodeGen::AggValueSlot::getPointer(), getPointerAndSize(), getType(), InitCatchParam(), clang::CodeGen::ConstantAddress::isaImpl(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeMatrixElt(), clang::CodeGen::LValue::MakeVectorElt(), clang::CodeGen::DominatingValue< Address >::needsSaving(), performTypeAdjustment(), pushTemporaryCleanup(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), clang::CodeGen::DominatingLLVMValue::save(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::LValue::setAddress(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), shuffleAndStore(), tryRemoveRetainOfSelf(), withAlignment(), withElementType(), and wrapWithBPFPreserveStaticOffset().

◆ getType()

llvm::PointerType * clang::CodeGen::Address::getType ( ) const
inline

◆ invalid()

static Address clang::CodeGen::Address::invalid ( )
inlinestatic

◆ isKnownNonNull()

KnownNonNull_t clang::CodeGen::Address::isKnownNonNull ( ) const
inline

◆ isValid()

bool clang::CodeGen::Address::isValid ( ) const
inline

◆ setKnownNonNull()

Address clang::CodeGen::Address::setKnownNonNull ( )
inline

Set the non-null bit.

Definition at line 111 of file Address.h.

References isValid().

Referenced by clang::CodeGen::AggValueSlot::forAddr().

◆ withAlignment()

Address clang::CodeGen::Address::withAlignment ( CharUnits  NewAlignment) const
inline

Return address with different alignment, but same pointer and element type.

Definition at line 93 of file Address.h.

References getElementType(), getPointer(), and isKnownNonNull().

Referenced by CheckAtomicAlignment(), emitOutlinedFunctionPrologue(), and emitPrivatesInit().

◆ withElementType()

Address clang::CodeGen::Address::withElementType ( llvm::Type *  ElemTy) const
inline

◆ withPointer()

Address clang::CodeGen::Address::withPointer ( llvm::Value *  NewPointer,
KnownNonNull_t  IsKnownNonNull 
) const
inline

Return address with different pointer, but same element type and alignment.

Definition at line 85 of file Address.h.

References getAlignment(), and getElementType().

Referenced by castToBase(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), and clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup().


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