LLVM
8.0.1
|
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 | |
uint64_t | getSizeInBytes () const |
uint64_t | getSizeInBits () const |
unsigned | getAlignment () const |
bool | hasPadding () const |
Returns whether the struct has padding or not between its fields. More... | |
unsigned | getElementContainingOffset (uint64_t Offset) const |
Given a valid byte offset into the structure, returns the structure index that contains it. More... | |
uint64_t | getElementOffset (unsigned Idx) const |
uint64_t | 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 529 of file DataLayout.h.
|
inline |
Definition at line 541 of file DataLayout.h.
Referenced by llvm::DataLayout::getABITypeAlignment(), llvm::DataLayout::getIndexTypeSizeInBits(), and llvm::DataLayout::getPrefTypeAlignment().
unsigned StructLayout::getElementContainingOffset | ( | uint64_t | Offset | ) | const |
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 84 of file DataLayout.cpp.
References assert(), SI, and llvm::upper_bound().
Referenced by llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), foldOperationIntoPhiValue(), getNaturalGEPRecursively(), getTypePartition(), llvm::WholeProgramDevirtPass::run(), and stripAggregateTypeWrapping().
|
inline |
Definition at line 551 of file DataLayout.h.
References assert().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), aliasSameBasePointerGEPs(), CC_MipsO32_FP64(), computeKnownBitsFromOperator(), computeValueLLTs(), llvm::ComputeValueVTs(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::createEfficiencySanitizerPass(), llvm::EmitGEPOffset(), emitGlobalConstantStruct(), evaluateGEPOffsetExpression(), foldOperationIntoPhiValue(), getComparePred(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::DataLayout::getIndexedOffsetInType(), getMaxPointerSize(), getNaturalGEPRecursively(), GetOffsetFromIndex(), getTypePartition(), llvm::ExecutionEngine::InitializeMemory(), isGEPKnownNonNull(), isMulPowOf2(), isPromotedInstructionLegal(), llvm::WholeProgramDevirtPass::run(), AllocaSlices::SliceBuilder::SliceBuilder(), splitGlobal(), SRAGlobal(), and llvm::Interpreter::visitAllocaInst().
|
inline |
Definition at line 556 of file DataLayout.h.
Referenced by SRAGlobal().
|
inline |
Definition at line 539 of file DataLayout.h.
|
inline |
Definition at line 537 of file DataLayout.h.
Referenced by aliasSameBasePointerGEPs(), computeArraySize(), llvm::createEfficiencySanitizerPass(), emitGlobalConstantStruct(), foldOperationIntoPhiValue(), getNaturalGEPRecursively(), getTypePartition(), PerformHeapAllocSRoA(), llvm::WholeProgramDevirtPass::run(), splitGlobal(), and tryToOptimizeStoreOfMallocToGlobal().
|
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 545 of file DataLayout.h.
|
friend |
Definition at line 561 of file DataLayout.h.