LLVM: llvm::StructLayout Class Reference (original) (raw)
Used to lazily calculate structure layout information for a target machine, based on the DataLayout structure. More...
#include "[llvm/IR/DataLayout.h](DataLayout%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| TypeSize | getSizeInBytes () const |
| TypeSize | getSizeInBits () const |
| Align | getAlignment () const |
| bool | hasPadding () const |
| Returns whether the struct has padding or not between its fields. | |
| LLVM_ABI unsigned | getElementContainingOffset (uint64_t FixedOffset) const |
| Given a valid byte offset into the structure, returns the structure index that contains it. | |
| MutableArrayRef< TypeSize > | getMemberOffsets () |
| ArrayRef< TypeSize > | getMemberOffsets () const |
| TypeSize | getElementOffset (unsigned Idx) const |
| TypeSize | getElementOffsetInBits (unsigned Idx) const |
Used to lazily calculate structure layout information for a target machine, based on the DataLayout structure.
Definition at line 712 of file DataLayout.h.
◆ getAlignment()
| Align llvm::StructLayout::getAlignment ( ) const | inline |
|---|
◆ getElementContainingOffset()
Given a valid byte offset into the structure, returns the structure index that contains it.
getElementContainingOffset - Given a valid offset into the structure, return the structure index that contains it.
Definition at line 92 of file DataLayout.cpp.
References assert(), llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::TypeSize::getFixed(), getMemberOffsets(), llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownGT(), llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownLE(), llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownLT(), llvm::Offset, and llvm::upper_bound().
Referenced by findFuncPointers(), llvm::DataLayout::getGEPIndexForOffset(), llvm::getPointerAtOffset(), getTypePartition(), replaceCBufferAccesses(), splitGlobal(), and stripAggregateTypeWrapping().
◆ getElementOffset()
Definition at line 743 of file DataLayout.h.
References assert(), and getMemberOffsets().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::GEPOperator::collectOffset(), computeKnownBitsFromOperator(), llvm::computeValueLLTs(), llvm::ComputeValueTypes(), llvm::decomposeLinearExpression(), emitGlobalConstantImpl(), emitGlobalConstantStruct(), findFuncPointers(), getElementOffsetInBits(), llvm::DataLayout::getGEPIndexForOffset(), llvm::DataLayout::getIndexedOffsetInType(), llvm::GEPOperator::getMaxPreservedAlignment(), getMemberOffsets(), llvm::ScalarEvolution::getOffsetOfExpr(), llvm::getPointerAtOffset(), getTypePartition(), llvm::ExecutionEngine::InitializeMemory(), isGEPKnownNonNull(), and splitGlobal().
◆ getElementOffsetInBits()
| TypeSize llvm::StructLayout::getElementOffsetInBits ( unsigned Idx) const | inline |
|---|
◆ getMemberOffsets() [1/2]
◆ getMemberOffsets() [2/2]
◆ getSizeInBits()
| TypeSize llvm::StructLayout::getSizeInBits ( ) const | inline |
|---|
◆ getSizeInBytes()
| TypeSize llvm::StructLayout::getSizeInBytes ( ) const | inline |
|---|
◆ hasPadding()
| bool llvm::StructLayout::hasPadding ( ) const | inline |
|---|
Returns whether the struct has padding or not between its fields.
NB: Padding in nested element is not taken into account.
Definition at line 729 of file DataLayout.h.
◆ DataLayout
The documentation for this class was generated from the following files:
- include/llvm/IR/DataLayout.h
- lib/IR/DataLayout.cpp