clang 17.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.
 
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 71 of file Address.h.

References getType().

Referenced by castValueToType(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), and clang::CodeGen::ConstantAddress::getElementBitCast().

◆ getAlignment()

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

Return the alignment of this pointer.

Definition at line 81 of file Address.h.

References isValid().

Referenced by ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::ConstantAddress::castImpl(), 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::CreateElementBitCast(), 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(), 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::ConstantAddress::getElementBitCast(), 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(), and withPointer().

◆ getElementType()

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

Return the type of the values stored in this address.

Definition at line 65 of file Address.h.

References isValid().

Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::ConstantAddress::castImpl(), castToBase(), CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), 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(), emitARCLoadOperation(), emitARCStoreOperation(), EmitArrayDelete(), emitArraySubscriptGEP(), EmitCheckedMixedSignMultiply(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitMergePHI(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), emitOMPAtomicCompareExpr(), EmitPointerWithAlignment(), emitStoresForConstant(), emitStoresForPatternInit(), emitStoresForZeroInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), 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(), and withPointer().

◆ getName()

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

Return the IR name of the pointer value.

Definition at line 76 of file Address.h.

References getPointer().

Referenced by CreateCoercedLoad(), and clang::CodeGen::CGOpenMPRuntime::registerTargetGlobalVariable().

◆ getPointer()

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

Definition at line 54 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(), CheckAtomicAlignment(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), 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::CreateElementBitCast(), 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(), emitAtomicCmpXchg(), EmitAtomicOp(), EmitBitTestIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitDestroyingObjectDelete(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitForStaticInitCall(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitMergePHI(), emitNonContiguousDescriptor(), emitNonZeroVLAInit(), EmitObjectDelete(), emitOffloadingArrays(), 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::emitTargetCall(), 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(), 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(), and withAlignment().

◆ 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 108 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 96 of file Address.h.

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

Referenced by emitOutlinedFunctionPrologue(), and emitPrivatesInit().

◆ 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 88 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: