LLVM 22.0.0git
|
Used to lazily calculate structure layout information for a target machine, based on the DataLayout structure. More...
#include "llvm/IR/DataLayout.h"
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 |
Friends | |
class | DataLayout |
Used to lazily calculate structure layout information for a target machine, based on the DataLayout structure.
Definition at line 626 of file DataLayout.h.
|
inline |
Definition at line 639 of file DataLayout.h.
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::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), LHS, llvm::Offset, RHS, and llvm::upper_bound().
Referenced by findFuncPointers(), llvm::DataLayout::getGEPIndexForOffset(), llvm::getPointerAtOffset(), getTypePartition(), splitGlobal(), and stripAggregateTypeWrapping().
Definition at line 657 of file DataLayout.h.
References assert(), getMemberOffsets(), and Idx.
Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::GEPOperator::collectOffset(), computeKnownBitsFromOperator(), llvm::computeValueLLTs(), llvm::ComputeValueTypes(), emitGlobalConstantImpl(), emitGlobalConstantStruct(), findFuncPointers(), getElementOffsetInBits(), llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), llvm::DataLayout::getGEPIndexForOffset(), llvm::DataLayout::getIndexedOffsetInType(), llvm::GEPOperator::getMaxPreservedAlignment(), llvm::ScalarEvolution::getOffsetOfExpr(), llvm::getPointerAtOffset(), getTypePartition(), llvm::ExecutionEngine::InitializeMemory(), isGEPKnownNonNull(), llvm::FastISel::selectGetElementPtr(), and splitGlobal().
Definition at line 662 of file DataLayout.h.
References getElementOffset(), and Idx.
Referenced by isDenselyPacked(), and solveDIType().
|
inline |
Definition at line 649 of file DataLayout.h.
References llvm::TrailingObjects< StructLayout, TypeSize >::getTrailingObjects().
Referenced by getElementContainingOffset(), getElementOffset(), and splitGlobal().
Definition at line 653 of file DataLayout.h.
References llvm::TrailingObjects< StructLayout, TypeSize >::getTrailingObjects().
|
inline |
Definition at line 637 of file DataLayout.h.
Referenced by llvm::ScalarEvolution::getOffsetOfExpr(), getTypePartition(), and llvm::DataLayout::getTypeSizeInBits().
|
inline |
Definition at line 635 of file DataLayout.h.
Referenced by emitGlobalConstantStruct(), llvm::DataLayout::getGEPIndexForOffset(), llvm::getPointerAtOffset(), getTypePartition(), and splitGlobal().
|
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 643 of file DataLayout.h.
|
friend |
Definition at line 667 of file DataLayout.h.