clang 19.0.0git
|
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this class is possibly signed. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/Address.h"
Public Member Functions | |
Address (llvm::Value *pointer, llvm::Type *elementType, CharUnits alignment, KnownNonNull_t IsKnownNonNull=NotKnownNonNull) | |
Address (llvm::Value *BasePtr, llvm::Type *ElementType, CharUnits Alignment, llvm::Value *Offset, KnownNonNull_t IsKnownNonNull=NotKnownNonNull) | |
Address (RawAddress RawAddr) | |
bool | isValid () const |
void | replaceBasePointer (llvm::Value *P) |
This function is used in situations where the caller is doing some sort of opaque "laundering" of the pointer. | |
CharUnits | getAlignment () const |
void | setAlignment (CharUnits Value) |
llvm::Value * | getBasePointer () 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. | |
void | setElementType (llvm::Type *Ty) |
KnownNonNull_t | isKnownNonNull () const |
Whether the pointer is known not to be null. | |
Address | setKnownNonNull () |
bool | hasOffset () const |
llvm::Value * | getOffset () const |
llvm::Value * | emitRawPointer (CodeGenFunction &CGF) const |
Return the pointer contained in this class after authenticating it and adding offset to it if necessary. | |
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. | |
Static Public Member Functions | |
static Address | invalid () |
Protected Member Functions | |
Address (std::nullptr_t) | |
Friends | |
class | CGBuilderTy |
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this class is possibly signed.
|
inlineprotected |
|
inline |
Definition at line 133 of file Address.h.
References clang::CharUnits::isZero().
|
inline |
|
inline |
|
inline |
Return the pointer contained in this class after authenticating it and adding offset to it if necessary.
Definition at line 220 of file Address.h.
References getBasePointer().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CGObjCRuntime::canMessageReceiverBeNull(), castValueFromUintptr(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateGEP(), createLoadInstBefore(), createStoreInstBefore(), 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(), emitProxyTaskFunction(), clang::CodeGen::LValue::emitRawPointer(), clang::CodeGen::AggValueSlot::emitRawPointer(), 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::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::emitVoidPtrDirectVAArg(), emitWritebackArg(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), getPointerAndSize(), clang::CodeGen::LValue::getRawBitFieldPointer(), clang::CodeGen::LValue::getRawExtVectorPointer(), clang::CodeGen::LValue::getRawVectorPointer(), InitCatchParam(), performTypeAdjustment(), pushTemporaryCleanup(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), clang::CodeGen::DominatingLLVMValue::save(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), shuffleAndStore(), and wrapWithBPFPreserveStaticOffset().
|
inline |
|
inline |
Definition at line 166 of file Address.h.
Referenced by ApplyNonVirtualAndVirtualOffset(), CheckAtomicAlignment(), 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::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::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(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::AggValueSlot::getAlignment(), clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), shuffleAndStore(), withElementType(), withPointer(), and wrapWithBPFPreserveStaticOffset().
|
inline |
Definition at line 170 of file Address.h.
References isValid(), and Pointer.
Referenced by clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), clang::CodeGen::CGBuilderTy::CreatePreserveUnionAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStripInvariantGroup(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope(), emitRawPointer(), emitWriteback(), emitWritebackArg(), findDominatingStoreToReturnValue(), clang::CodeGen::RValue::getAggregatePointer(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), clang::CodeGen::CodeGenFunction::getAsNaturalPointerTo(), clang::CodeGen::LValue::getMatrixPointer(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::LValue::getVectorPointer(), isProvablyNonNull(), clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr(), clang::CodeGen::DominatingValue< Address >::needsSaving(), clang::CodeGen::DominatingValue< Address >::save(), tryRemoveRetainOfSelf(), and withElementType().
|
inline |
Return the type of the values stored in this address.
Definition at line 184 of file Address.h.
References isValid().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), 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::CreateGEP(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), 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(), emitStoresForConstant(), emitStoresForPatternInit(), emitStoresForZeroInit(), clang::CodeGen::emitVoidPtrDirectVAArg(), emitWriteback(), EnterStructPointerForCoercedAccess(), findDominatingStoreToReturnValue(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), getNullForVariable(), getPointerAndSize(), clang::CodeGen::DominatingValue< Address >::save(), shuffleAndStore(), tryEmitARCCopyWeakInit(), withAlignment(), withPointer(), and wrapWithBPFPreserveStaticOffset().
|
inline |
Return the IR name of the pointer value.
Definition at line 193 of file Address.h.
References Pointer.
Referenced by CreateCoercedLoad().
|
inline |
Definition at line 216 of file Address.h.
Referenced by clang::CodeGen::DominatingValue< Address >::needsSaving(), and clang::CodeGen::DominatingValue< Address >::save().
|
inline |
Return the type of the pointer value.
Definition at line 176 of file Address.h.
References Pointer.
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), castToBase(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), emitARCCopyOperation(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::emitMergePHI(), emitNonZeroVLAInit(), emitOutlinedFunctionPrologue(), EmitPointerWithAlignment(), emitPseudoObjectExpr(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), getAddressSpace(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr(), clang::CodeGen::DominatingValue< Address >::save(), and shuffleAndStore().
|
inline |
Definition at line 214 of file Address.h.
Referenced by clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), setElementType(), and withElementType().
|
inlinestatic |
Definition at line 153 of file Address.h.
Referenced by castToBase(), emitDeclTargetVarDeclLValue(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), emitInterWarpCopyFunction(), clang::CodeGen::ABIInfo::EmitMSVAArg(), EmitOMPAggregateInit(), emitOutlinedFunctionPrologue(), emitReduceInitFunction(), emitScanBasedDirective(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPSIMDRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::AggValueSlot::ignored(), clang::CodeGen::CGCXXABI::InitializeArrayCookie(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), clang::CodeGen::LValue::MakeGlobalReg(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().
|
inline |
Whether the pointer is known not to be null.
Definition at line 203 of file Address.h.
References isValid(), and Pointer.
Referenced by clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), withAlignment(), and withElementType().
|
inline |
Definition at line 154 of file Address.h.
References Pointer.
Referenced by castToBase(), CheckAggExprForMemSetUse(), EmitCleanup(), EmitGlobalVarDeclLValue(), emitPrivatesInit(), clang::CodeGen::LValue::emitRawPointer(), clang::CodeGen::AggValueSlot::emitRawPointer(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), getBasePointer(), getElementType(), clang::CodeGen::EHCleanupScope::hasActiveFlag(), clang::CodeGen::AggValueSlot::isIgnored(), isKnownNonNull(), clang::CodeGen::ReturnValueSlot::isNull(), replaceBasePointer(), setKnownNonNull(), and SetupCleanupBlockActivation().
|
inline |
This function is used in situations where the caller is doing some sort of opaque "laundering" of the pointer.
Definition at line 158 of file Address.h.
References isValid(), P, and Pointer.
Referenced by clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), clang::CodeGen::CGBuilderTy::CreatePreserveUnionAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStripInvariantGroup(), and clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr().
|
inline |
Definition at line 168 of file Address.h.
Referenced by EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr(), and clang::CodeGen::LValue::setAlignment().
|
inline |
Definition at line 196 of file Address.h.
References hasOffset().
|
inline |
Definition at line 208 of file Address.h.
References isValid(), clang::CodeGen::KnownNonNull, and Pointer.
Referenced by clang::CodeGen::AggValueSlot::forAddr().
Return address with different alignment, but same pointer and element type.
Definition at line 234 of file Address.h.
References getElementType(), isKnownNonNull(), and Pointer.
Referenced by CheckAtomicAlignment(), emitOutlinedFunctionPrologue(), and emitPrivatesInit().
|
inline |
Return address with different element type, but same pointer and alignment.
Definition at line 241 of file Address.h.
References getAlignment(), getBasePointer(), hasOffset(), and isKnownNonNull().
Referenced by castValueToType(), CheckAggExprForMemSetUse(), complexTempStructure(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), createUnnamedGlobalForMemcpyFrom(), emitAddressAtOffset(), EmitAsmStores(), EmitAtomicCmpXchg128ForMSIntrin(), clang::CodeGen::ReductionCodeGen::emitCleanups(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), emitOMPArraySectionBase(), EmitPointerWithAlignment(), emitReduceCombFunction(), emitReduceInitFunction(), emitStoresForConstant(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), loadToBegin(), performTypeAdjustment(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), and tryEmitARCCopyWeakInit().
|
inline |
Return address with different pointer, but same element type and alignment.
Definition at line 226 of file Address.h.
References getAlignment(), and getElementType().
Referenced by castToBase().
|
friend |