|
clang 23.0.0git
|
#include "/work/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 |
| cir::AllocaOp | getUnderlyingAllocaOp () const |
| Return the underlying alloca for this address, if any. | |
| 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) | |
|
inlineprotected |
Definition at line 46 of file Address.h.
References clang::nullptr.
Referenced by Address(), Address(), invalid(), setKnownNonNull(), withAlignment(), withElementType(), and withPointer().
|
inline |
|
inline |
Definition at line 53 of file Address.h.
References isKnownNonNull().
|
inline |
Definition at line 68 of file Address.h.
References Address(), clang::cast(), and getType().
|
inline |
Return the pointer contained in this class after authenticating it and adding offset to it if necessary.
Definition at line 112 of file Address.h.
References cir::MissingFeatures::addressPointerAuthInfo(), and getBasePointer().
Referenced by clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), enterNewDeleteCleanup(), and makeBinaryAtomicValue().
|
inline |
|
inline |
Definition at line 138 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::createMemSet(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitAddrOfZeroSizeField(), 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::CIRGenFunction::maybeCastStackAddressSpace(), clang::CIRGen::LValue::setAddress(), clang::CIRGen::CIRGenFunction::setBeforeOutermostConditional(), withElementType(), and withPointer().
|
inline |
Definition at line 103 of file Address.h.
References getPointer(), and isValid().
Referenced by emitRawPointer(), clang::CIRGen::CIRGenFunction::getAsNaturalPointerTo(), and withElementType().
|
inline |
Get the operation which defines this address.
Definition at line 141 of file Address.h.
References getPointer(), and isValid().
Referenced by clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), and getDefiningOp().
|
inline |
Definition at line 147 of file Address.h.
References getDefiningOp().
|
inline |
Definition at line 125 of file Address.h.
References isValid().
Referenced by checkAtomicAlignment(), clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenBuilderTy::createDerivedClassAddr(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), clang::CIRGen::CIRGenFunction::emitAMDGPUBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitArrayLength(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), emitArraySubscriptPtr(), clang::CIRGen::CIRGenFunction::emitAsmInputLValue(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), emitAtomicCmpXchg(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), 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::emitStoreThroughExtVectorComponentLValue(), 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::CIRGenFunction::maybeCastStackAddressSpace(), clang::CIRGen::LValue::setAddress(), withAlignment(), and withPointer().
|
inline |
Definition at line 98 of file Address.h.
References isValid().
Referenced by clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenFunction::createCleanupActiveFlag(), 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::createMemSet(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitAddrOfZeroSizeField(), 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::emitBuiltinExpr(), emitCleanup(), clang::CIRGen::CIRGenFunction::emitCoroutineBody(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDeleteExpr(), clang::CIRGen::CIRGenFunction::emitCXXMemberDataPointerAddress(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), emitCXXTypeidFromVTable(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitDelegateCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitDestroy(), emitDestroyingObjectDelete(), emitDynamicCastToVoid(), emitExactDynamicCast(), clang::CIRGen::CIRGenFunction::emitExtVectorElementLValue(), clang::CIRGen::CIRGenFunction::emitLambdaDelegatingInvokeBody(), clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), emitObjectDelete(), clang::CIRGen::CIRGenFunction::emitPointerWithAlignment(), clang::CIRGen::CIRGenFunction::emitReturnOfRValue(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), clang::CIRGen::CIRGenFunction::emitVAArg(), clang::CIRGen::CIRGenFunction::emitX86BuiltinExpr(), enterNewDeleteCleanup(), clang::CIRGen::RValue::getAggregatePointer(), getBasePointer(), getDefiningOp(), getType(), getUnderlyingAllocaOp(), clang::CIRGen::CIRGenFunction::getVTablePtr(), hoistAllocaOutOfCleanupScope(), initCatchParam(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis(), clang::CIRGen::LValue::makeAddr(), clang::CIRGen::LValue::makeBitfield(), clang::CIRGen::LValue::makeExtVectorElt(), clang::CIRGen::LValue::makeVectorElt(), clang::CIRGen::CIRGenFunction::maybeCastStackAddressSpace(), packArgsIntoNVPTXFormatBuffer(), performTypeAdjustment(), clang::CIRGen::CIRGenFunction::popCleanupBlock(), clang::CIRGen::LValue::setAddress(), clang::CIRGen::CIRGenFunction::setAddrOfLocalVar(), and withAlignment().
|
inline |
Definition at line 117 of file Address.h.
References getPointer(), and getType().
Referenced by Address(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), getAddressSpace(), getType(), and performTypeAdjustment().
|
inline |
Return the underlying alloca for this address, if any.
Addresses may refer to an alloca through an address space cast, for example when a target stack address space is cast to the language-visible address space. Peel those casts so callers that need to annotate the original alloca can still find it.
Definition at line 157 of file Address.h.
References getPointer().
Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), emitStoresForConstant(), hoistAllocaOutOfCleanupScope(), and clang::CIRGen::CIRGenFunction::maybeCastStackAddressSpace().
|
inlinestatic |
Definition at line 76 of file Address.h.
References Address().
Referenced by clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberPointerCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), clang::CIRGen::CIRGenFunction::emitPointerToDataMemberBinaryExpr(), clang::CIRGen::CIRGenFunction::FullExprCleanupScope::exit(), clang::CIRGen::CIRGenFunction::AutoVarEmission::getObjectAddress(), clang::CIRGen::AggValueSlot::ignored(), and clang::CIRGen::CIRGenFunction::popCleanupBlock().
|
inline |
Whether the pointer is known not to be null.
Definition at line 168 of file Address.h.
References isValid().
Referenced by Address(), and withAlignment().
|
inline |
Definition at line 77 of file Address.h.
Referenced by clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAutoVarInit(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCastLValue(), emitCleanup(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), getBasePointer(), getDefiningOp(), getElementType(), getPointer(), isKnownNonNull(), clang::CIRGen::CIRGenFunction::popCleanupBlock(), clang::CIRGen::CIRGenFunction::pushPendingCleanupToEHStack(), and setKnownNonNull().
|
inline |
|
inline |
Return address with different alignment, but same pointer and element type.
Definition at line 89 of file Address.h.
References Address(), getElementType(), getPointer(), and isKnownNonNull().
Referenced by checkAtomicAlignment(), and clang::CIRGen::CIRGenFunction::emitCXXNewExpr().
| Address Address::withElementType | ( | CIRGenBuilderTy & | builder, |
| mlir::Type | ElemTy ) const |
Return address with different element type, a bitcast pointer, and the same alignment.
Definition at line 219 of file CIRGenBuilder.cpp.
References Address(), cir::MissingFeatures::addressIsKnownNonNull(), cir::MissingFeatures::addressOffset(), cir::MissingFeatures::addressPointerAuthInfo(), cir::CIRBaseBuilderTy::createPtrBitcast(), getAlignment(), and getBasePointer().
Referenced by clang::CIRGen::CIRGenFunction::emitAnyExprToExn(), clang::CIRGen::CIRGenFunction::emitAsmInputLValue(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitCastLValue(), clang::CIRGen::CIRGenFunction::emitCXXDeleteExpr(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), clang::CIRGen::CIRGenFunction::emitExtVectorElementLValue(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), emitStoresForConstant(), and clang::CIRGen::CIRGenFunction::getAddressOfBaseClass().
|
inline |
Return address with different pointer, but same element type and alignment.
Definition at line 83 of file Address.h.
References Address(), getAlignment(), and getElementType().
Referenced by emitAtomicCmpXchg(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitLValue(), and clang::CIRGen::CIRGenFunction::emitNewArrayInitializer().