clang 22.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 |
llvm::Align | getAlignment (mlir::Type ty, bool abiOrPref) const |
Internal helper method that returns requested alignment for type. | |
llvm::Align | getABITypeAlign (mlir::Type ty) const |
llvm::TypeSize | getTypeStoreSize (mlir::Type ty) const |
Returns the maximum number of bytes that may be overwritten by storing the specified type. | |
llvm::TypeSize | getTypeAllocSize (mlir::Type ty) const |
Returns the offset in bytes between successive objects of the specified type, including alignment padding. | |
llvm::TypeSize | getTypeSizeInBits (mlir::Type ty) const |
Public Attributes | |
mlir::DataLayout | layout |
Definition at line 22 of file CIRDataLayout.h.
CIRDataLayout::CIRDataLayout | ( | mlir::ModuleOp | modOp | ) |
Constructs a DataLayout the module's data layout attribute.
Definition at line 11 of file CIRDataLayout.cpp.
References reset().
|
inline |
Definition at line 41 of file CIRDataLayout.h.
References getAlignment().
Referenced by clang::CIRGen::CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(), clang::CIRGen::CIRGenVTables::generateConstructionVTable(), clang::CIRGen::CIRGenVTables::getAddrOfVTT(), and getTypeAllocSize().
llvm::Align CIRDataLayout::getAlignment | ( | mlir::Type | ty, |
bool | abiOrPref | ||
) | const |
Internal helper method that returns requested alignment for type.
Definition at line 26 of file CIRDataLayout.cpp.
References cir::MissingFeatures::addressSpace(), and layout.
Referenced by getABITypeAlign().
|
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 66 of file CIRDataLayout.h.
References getABITypeAlign(), and getTypeStoreSize().
Referenced by clang::CIRGen::CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset().
llvm::TypeSize CIRDataLayout::getTypeSizeInBits | ( | mlir::Type | ty | ) | const |
Definition at line 39 of file CIRDataLayout.cpp.
References cir::MissingFeatures::addressSpace(), cir::isSized(), and layout.
Referenced by getTypeStoreSize().
|
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 52 of file CIRDataLayout.h.
References getTypeSizeInBits().
Referenced by getTypeAllocSize(), and isFullSizeType().
|
inline |
Definition at line 36 of file CIRDataLayout.h.
void CIRDataLayout::reset | ( | mlir::DataLayoutSpecInterface | spec | ) |
Parse a data layout string (with fallback to default values).
Definition at line 15 of file CIRDataLayout.cpp.
Referenced by CIRDataLayout().
mlir::DataLayout cir::CIRDataLayout::layout |
Definition at line 28 of file CIRDataLayout.h.
Referenced by clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), clang::CIRGen::CIRGenFunction::getAddrOfBitFieldStorage(), getAlignment(), and getTypeSizeInBits().