clang 23.0.0git
clang::CIRGen::Address Class Reference

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

Public Member Functions

 Address (mlir::Value pointer, mlir::Type elementType, clang::CharUnits alignment)
 Address (mlir::Value pointer, mlir::Type elementType, clang::CharUnits alignment, bool isKnownNonNull)
 Address (mlir::Value pointer, clang::CharUnits alignment)
bool isValid () const
Address withPointer (mlir::Value newPtr) const
 Return address with different pointer, but same element type and alignment.
Address withAlignment (clang::CharUnits newAlignment) const
 Return address with different alignment, but same pointer and element type.
Address withElementType (CIRGenBuilderTy &builder, mlir::Type ElemTy) const
 Return address with different element type, a bitcast pointer, and the same alignment.
mlir::Value getPointer () const
mlir::Value getBasePointer () const
mlir::Value emitRawPointer () const
 Return the pointer contained in this class after authenticating it and adding offset to it if necessary.
mlir::Type getType () const
mlir::Type getElementType () const
mlir::ptr::MemorySpaceAttrInterface getAddressSpace () const
clang::CharUnits getAlignment () const
mlir::Operation * getDefiningOp () const
 Get the operation which defines this address.
template<typename OpTy>
OpTy getDefiningOp () const
bool 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

Definition at line 31 of file Address.h.

Constructor & Destructor Documentation

◆ Address() [1/4]

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

Definition at line 44 of file Address.h.

References clang::nullptr.

Referenced by Address(), Address(), invalid(), setKnownNonNull(), withAlignment(), withElementType(), and withPointer().

◆ Address() [2/4]

clang::CIRGen::Address::Address ( mlir::Value pointer,
mlir::Type elementType,
clang::CharUnits alignment )
inline

Definition at line 47 of file Address.h.

References Address(), and false.

◆ Address() [3/4]

clang::CIRGen::Address::Address ( mlir::Value pointer,
mlir::Type elementType,
clang::CharUnits alignment,
bool isKnownNonNull )
inline

Definition at line 51 of file Address.h.

References isKnownNonNull().

◆ Address() [4/4]

clang::CIRGen::Address::Address ( mlir::Value pointer,
clang::CharUnits alignment )
inline

Definition at line 66 of file Address.h.

References Address(), clang::cast(), and getType().

Member Function Documentation

◆ emitRawPointer()

mlir::Value clang::CIRGen::Address::emitRawPointer ( ) const
inline

Return the pointer contained in this class after authenticating it and adding offset to it if necessary.

Definition at line 110 of file Address.h.

References cir::MissingFeatures::addressPointerAuthInfo(), and getBasePointer().

Referenced by makeBinaryAtomicValue().

◆ getAddressSpace()

mlir::ptr::MemorySpaceAttrInterface clang::CIRGen::Address::getAddressSpace ( ) const
inline

Definition at line 131 of file Address.h.

References getType().

◆ getAlignment()

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

Definition at line 136 of file Address.h.

Referenced by checkAtomicAlignment(), clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenBuilderTy::createComplexImagPtr(), clang::CIRGen::CIRGenBuilderTy::createComplexRealPtr(), clang::CIRGen::CIRGenBuilderTy::createDerivedClassAddr(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), clang::CIRGen::CIRGenBuilderTy::createGetBitfield(), clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitArraySubscriptPtr(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), emitAtomicCmpXchg(), emitAtomicOp(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CIRGen::CIRGenFunction::emitConditionalOperatorLValue(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberDataPointerAddress(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitDestroy(), emitDynamicCastToVoid(), emitExactDynamicCast(), clang::CIRGen::CIRGenFunction::emitExtVectorElementLValue(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), clang::CIRGen::CIRGenFunction::getVTablePtr(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::CIRGen::LValue::makeAddr(), clang::CIRGen::LValue::makeBitfield(), clang::CIRGen::LValue::makeExtVectorElt(), clang::CIRGen::LValue::makeVectorElt(), clang::CIRGen::LValue::setAddress(), clang::CIRGen::CIRGenFunction::setBeforeOutermostConditional(), withElementType(), and withPointer().

◆ getBasePointer()

mlir::Value clang::CIRGen::Address::getBasePointer ( ) const
inline

◆ getDefiningOp() [1/2]

mlir::Operation * clang::CIRGen::Address::getDefiningOp ( ) const
inline

Get the operation which defines this address.

Definition at line 139 of file Address.h.

References getPointer(), and isValid().

Referenced by clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), emitStoresForConstant(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), and getDefiningOp().

◆ getDefiningOp() [2/2]

template<typename OpTy>
OpTy clang::CIRGen::Address::getDefiningOp ( ) const
inline

Definition at line 145 of file Address.h.

References getDefiningOp().

◆ getElementType()

mlir::Type clang::CIRGen::Address::getElementType ( ) const
inline

Definition at line 123 of file Address.h.

References isValid().

Referenced by checkAtomicAlignment(), clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenBuilderTy::createDerivedClassAddr(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), clang::CIRGen::CIRGenFunction::emitArrayLength(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), emitArraySubscriptPtr(), clang::CIRGen::CIRGenFunction::emitAsmInputLValue(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), emitAtomicCmpXchg(), clang::CIRGen::CIRGenFunction::emitAtomicStore(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CIRGen::CIRGenFunction::emitConditionalOperatorLValue(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitLoadOfBitfieldLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLValueForBitField(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), clang::CIRGen::CIRGenFunction::emitNullInitialization(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), emitStoresForConstant(), clang::CIRGen::CIRGenFunction::emitStoreThroughBitfieldLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::getAddressOfDirectBaseInCompleteClass(), clang::CIRGen::CIRGenFunction::getAddrOfBitFieldStorage(), clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis(), clang::CIRGen::LValue::makeAddr(), clang::CIRGen::LValue::makeBitfield(), clang::CIRGen::LValue::makeExtVectorElt(), clang::CIRGen::LValue::makeVectorElt(), clang::CIRGen::LValue::setAddress(), withAlignment(), and withPointer().

◆ getPointer()

mlir::Value clang::CIRGen::Address::getPointer ( ) const
inline

Definition at line 96 of file Address.h.

References isValid().

Referenced by clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenBuilderTy::createComplexImagPtr(), clang::CIRGen::CIRGenBuilderTy::createComplexRealPtr(), clang::CIRGen::CIRGenBuilderTy::createDerivedClassAddr(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), clang::CIRGen::CIRGenBuilderTy::createGetBitfield(), clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), clang::CIRGen::CIRGenFunction::createTempAlloca(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), clang::CIRGen::CIRGenFunction::emitAggregateCopy(), emitArraySubscriptPtr(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitAsmInputLValue(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), emitAtomicCmpXchg(), emitAtomicOp(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarInit(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitCoroutineBody(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberDataPointerAddress(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), emitCXXTypeidFromVTable(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitDelegateCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitDestroy(), emitDynamicCastToVoid(), emitExactDynamicCast(), clang::CIRGen::CIRGenFunction::emitExtVectorElementLValue(), clang::CIRGen::CIRGenFunction::emitLambdaDelegatingInvokeBody(), clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), emitObjectDelete(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), clang::CIRGen::CIRGenFunction::emitVAArg(), clang::CIRGen::CIRGenFunction::emitX86BuiltinExpr(), enterNewDeleteCleanup(), clang::CIRGen::RValue::getAggregatePointer(), getBasePointer(), getDefiningOp(), getType(), clang::CIRGen::CIRGenFunction::getVTablePtr(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis(), clang::CIRGen::LValue::makeAddr(), clang::CIRGen::LValue::makeBitfield(), clang::CIRGen::LValue::makeExtVectorElt(), clang::CIRGen::LValue::makeVectorElt(), performTypeAdjustment(), clang::CIRGen::LValue::setAddress(), clang::CIRGen::CIRGenFunction::setAddrOfLocalVar(), and withAlignment().

◆ getType()

mlir::Type clang::CIRGen::Address::getType ( ) const
inline

◆ invalid()

◆ isKnownNonNull()

bool clang::CIRGen::Address::isKnownNonNull ( ) const
inline

Whether the pointer is known not to be null.

Definition at line 150 of file Address.h.

References isValid().

Referenced by Address(), and withAlignment().

◆ isValid()

◆ setKnownNonNull()

Address clang::CIRGen::Address::setKnownNonNull ( )
inline

Set the non-null bit.

Definition at line 156 of file Address.h.

References Address(), and isValid().

◆ withAlignment()

Address clang::CIRGen::Address::withAlignment ( clang::CharUnits newAlignment) const
inline

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

Definition at line 87 of file Address.h.

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

Referenced by checkAtomicAlignment(), and clang::CIRGen::CIRGenFunction::emitCXXNewExpr().

◆ withElementType()

◆ withPointer()

Address clang::CIRGen::Address::withPointer ( mlir::Value newPtr) const
inline

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

Definition at line 81 of file Address.h.

References Address(), getAlignment(), and getElementType().

Referenced by emitAtomicCmpXchg(), and clang::CIRGen::CIRGenFunction::emitCXXNewExpr().


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