|
clang 24.0.0git
|
#include "clang/CIR/Dialect/IR/CIRDataLayout.h"
Public Member Functions | |
| CIRDataLayout (mlir::ModuleOp modOp) | |
| Constructs a DataLayout the module's data layout attribute. | |
| void | reset (mlir::DataLayoutSpecInterface spec) |
| Parse a data layout string (with fallback to default values). | |
| bool | isBigEndian () const |
| unsigned | getProgramAddressSpace () const |
| llvm::Align | getAlignment (mlir::Type ty, bool useABIAlign) const |
| Internal helper method that returns requested alignment for type. | |
| llvm::Align | getABITypeAlign (mlir::Type ty) const |
| uint64_t | getTypeLanguageAlignment (mlir::Type ty) const |
Returns the alignment, in bytes, that the source language requires for an object of type ty. | |
| llvm::TypeSize | getTypeStoreSize (mlir::Type ty) const |
| Returns the maximum number of bytes that may be overwritten by storing the specified type. | |
| llvm::TypeSize | getTypeStoreSizeInBits (mlir::Type ty) const |
| Returns the maximum number of bits that may be overwritten by storing the specified type; always a multiple of 8. | |
| llvm::TypeSize | getTypeAllocSize (mlir::Type ty) const |
| Returns the offset in bytes between successive objects of the specified type, including alignment padding. | |
| llvm::TypeSize | getTypeAllocSizeInBits (mlir::Type ty) const |
| Returns the offset in bits between successive objects of the specified type, including alignment padding; always a multiple of 8. | |
| llvm::TypeSize | getTypeSizeInBits (mlir::Type ty) const |
| llvm::TypeSize | getPointerTypeSizeInBits (mlir::Type ty) const |
| mlir::Type | getIntPtrType (mlir::Type ty) const |
| bool | typeSizeEqualsStoreSize (mlir::Type ty) const |
| Returns true if no extra padding bits are needed when storing the specified type. | |
| mlir::ptr::MemorySpaceAttrInterface | getAllocaAddrSpace (mlir::MLIRContext *ctx) |
| mlir::ptr::MemorySpaceAttrInterface | getDefaultGlobalsAddrSpace (mlir::MLIRContext *ctx) const |
Public Attributes | |
| mlir::DataLayout | layout |
Definition at line 23 of file CIRDataLayout.h.
| CIRDataLayout::CIRDataLayout | ( | mlir::ModuleOp | modOp | ) |
Constructs a DataLayout the module's data layout attribute.
Definition at line 13 of file CIRDataLayout.cpp.
|
inline |
Definition at line 57 of file CIRDataLayout.h.
References getAlignment().
Referenced by clang::CIRGen::CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(), emitNeonMultiVecLoadCall(), enterNewDeleteCleanup(), getTypeAllocSize(), and lowerArrayDtorCtorIntoLoop().
| llvm::Align CIRDataLayout::getAlignment | ( | mlir::Type | ty, |
| bool | useABIAlign ) const |
Internal helper method that returns requested alignment for type.
Definition at line 43 of file CIRDataLayout.cpp.
References cir::MissingFeatures::addressSpace(), and layout.
Referenced by getABITypeAlign().
|
inline |
Definition at line 143 of file CIRDataLayout.h.
References layout.
Referenced by lowerArrayDtorCtorIntoLoop().
|
inline |
|
inline |
Definition at line 128 of file CIRDataLayout.h.
References getPointerTypeSizeInBits().
|
inline |
|
inline |
Definition at line 52 of file CIRDataLayout.h.
Referenced by cir::direct::buildCtorDtorList().
|
inline |
Returns the offset in bytes between successive objects of the specified type, including alignment padding.
If Ty is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.
This is the amount that alloca reserves for this type. For example, returns 12 or 16 for x86_fp80, depending on alignment.
Definition at line 103 of file CIRDataLayout.h.
References getABITypeAlign(), and getTypeStoreSize().
Referenced by clang::CIRGen::CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(), clang::CIRGen::CIRGenBuilderTy::computeOffsetFromGlobalViewIndices(), emitStoresForConstant(), and getTypeAllocSizeInBits().
|
inline |
Returns the offset in bits between successive objects of the specified type, including alignment padding; always a multiple of 8.
If Ty is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.
This is the amount that alloca reserves for this type. For example, returns 96 or 128 for x86_fp80, depending on alignment.
Definition at line 116 of file CIRDataLayout.h.
References getTypeAllocSize().
| uint64_t CIRDataLayout::getTypeLanguageAlignment | ( | mlir::Type | ty | ) | const |
Returns the alignment, in bytes, that the source language requires for an object of type ty.
ABI classification, coercion temporaries, and accesses with no explicit alignment use it. The ABI alignment of ty is the alignment of the memory representation ty lowers to, which record layout and array strides use.
Definition at line 54 of file CIRDataLayout.cpp.
References cir::RecordType::getMembers(), cir::RecordType::getName(), cir::RecordType::getPacked(), getTypeLanguageAlignment(), cir::RecordType::isComplete(), layout, and cir::tryGetRecordLayout().
Referenced by cir::direct::getMemoryFallbackAlignment(), getTypeLanguageAlignment(), mapCIRType(), and recordUnadjustedAlign().
| llvm::TypeSize CIRDataLayout::getTypeSizeInBits | ( | mlir::Type | ty | ) | const |
Definition at line 103 of file CIRDataLayout.cpp.
References cir::MissingFeatures::addressSpace(), cir::isSized(), and layout.
Referenced by checkAtomicAlignment(), computeFullLaneShuffleMask(), deriveNeonSISDIntrinsicOperandTypes(), emitAsmStores(), emitCommonNeonSISDBuiltinExpr(), emitCXXNewAllocSize(), emitNeonRShiftImm(), clang::CIRGen::CIRGenFunction::emitStoreThroughExtVectorComponentLValue(), getSVEVectorForElementType(), getTypeStoreSize(), getTypeStoreSizeInBits(), and typeSizeEqualsStoreSize().
|
inline |
Returns the maximum number of bytes that may be overwritten by storing the specified type.
If Ty is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.
For example, returns 5 for i36 and 10 for x86_fp80.
Definition at line 75 of file CIRDataLayout.h.
References getTypeSizeInBits().
Referenced by emitAtomicCmpXchg(), getTypeAllocSize(), and isFullSizeType().
|
inline |
Returns the maximum number of bits that may be overwritten by storing the specified type; always a multiple of 8.
If Ty is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.
For example, returns 40 for i36 and 80 for x86_fp80.
Definition at line 88 of file CIRDataLayout.h.
References getTypeSizeInBits(), and uint64_t.
Referenced by typeSizeEqualsStoreSize().
|
inline |
Definition at line 50 of file CIRDataLayout.h.
| void CIRDataLayout::reset | ( | mlir::DataLayoutSpecInterface | spec | ) |
Parse a data layout string (with fallback to default values).
Definition at line 18 of file CIRDataLayout.cpp.
Referenced by CIRDataLayout().
|
inline |
Returns true if no extra padding bits are needed when storing the specified type.
For example, returns false for i19 that has a 24-bit store size.
Definition at line 138 of file CIRDataLayout.h.
References getTypeSizeInBits(), and getTypeStoreSizeInBits().
Referenced by determineNoUndef().
| mlir::DataLayout cir::CIRDataLayout::layout |
Definition at line 42 of file CIRDataLayout.h.
Referenced by CIRDataLayout(), clang::CIRGen::CIRGenBuilderTy::computeOffsetFromGlobalViewIndices(), clang::CIRGen::CIRGenBuilderTy::createGetMember(), getAlignment(), getAllocaAddrSpace(), getDefaultGlobalsAddrSpace(), getPointerTypeSizeInBits(), getTypeLanguageAlignment(), getTypeSizeInBits(), and getVTableEntryIndex().