LLVM API Documentation
#include <DataLayout.h>
This class holds a parsed version of the target data layout string in a module and provides methods for querying it. The target data layout string is specified *by the target* - a frontend generating LLVM IR is required to generate the right target data for the target being codegen'd to.
Definition at line 98 of file DataLayout.h.
llvm::DataLayout::DataLayout | ( | StringRef | LayoutDescription | ) | [inline, explicit] |
Constructs a DataLayout from a specification string. See reset().
Definition at line 180 of file DataLayout.h.
References reset().
DataLayout::DataLayout | ( | const Module * | M | ) | [explicit] |
Initialize target data from properties stored in the module.
Definition at line 347 of file DataLayout.cpp.
References init().
llvm::DataLayout::DataLayout | ( | const DataLayout & | DL | ) | [inline] |
Definition at line 189 of file DataLayout.h.
Definition at line 498 of file DataLayout.cpp.
bool llvm::DataLayout::exceedsNaturalStackAlignment | ( | unsigned | Align | ) | const [inline] |
Returns true if the given alignment exceeds the natural stack alignment.
Definition at line 238 of file DataLayout.h.
Referenced by enforceKnownAlignment(), and getMemcpyLoadsAndStores().
bool llvm::DataLayout::fitsInLegalInteger | ( | unsigned | Width | ) | const [inline] |
fitsInLegalInteger - This function returns true if the specified type fits in a native integer type supported by the CPU. For example, if the CPU only supports i32 as a native integer type, then i27 fits in a legal integer type but i45 does not.
Definition at line 290 of file DataLayout.h.
Referenced by llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), and SwitchToLookupTable().
unsigned DataLayout::getABIIntegerTypeAlignment | ( | unsigned | BitWidth | ) | const |
getABIIntegerTypeAlignment - Return the minimum ABI-required alignment for an integer type of the specified bitwidth.
Definition at line 693 of file DataLayout.cpp.
References llvm::INTEGER_ALIGN.
Referenced by llvm::MachineJumpTableInfo::getEntryAlignment().
unsigned DataLayout::getABITypeAlignment | ( | Type * | Ty | ) | const |
getABITypeAlignment - Return the minimum ABI-required alignment for the specified type.
Definition at line 687 of file DataLayout.cpp.
Referenced by computeKnownBits(), llvm::FastISel::createMachineMemOperandFor(), llvm::TargetLoweringBase::getByValTypeAlignment(), llvm::SelectionDAG::getEVTAlignment(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), getPreferredAlignment(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getTypeAllocSize(), InlineCallIfPossible(), isDereferenceablePointer(), LLVMABIAlignmentOfType(), LLVMCallFrameAlignmentOfType(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::PPCTargetLowering::PerformDAGCombine(), SRAGlobal(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitStoreInst(), and XFormVExtractWithShuffleIntoLoad().
char llvm::DataLayout::getGlobalPrefix | ( | ) | const [inline] |
Definition at line 256 of file DataLayout.h.
References llvm_unreachable.
Referenced by getNameWithPrefixx().
uint64_t DataLayout::getIndexedOffset | ( | Type * | Ty, |
ArrayRef< Value * > | Indices | ||
) | const |
getIndexedOffset - return the offset from the beginning of the type for the specified indices. This is used to implement getelementptr.
Definition at line 734 of file DataLayout.cpp.
References llvm::gep_type_begin(), llvm::Type::getContext(), llvm::StructLayout::getElementOffset(), llvm::Type::getInt32Ty(), getStructLayout(), llvm::Intrinsic::getType(), getTypeAllocSize(), llvm::Type::isPointerTy(), and llvm::ArrayRef< T >::size().
Referenced by llvm::DwarfCompileUnit::createGlobalVariableDIE(), and SymbolicallyEvaluateGEP().
IntegerType * DataLayout::getIntPtrType | ( | LLVMContext & | C, |
unsigned | AddressSpace = 0 |
||
) | const |
getIntPtrType - Return an integer type with size at least as big as that of a pointer in the given address space.
Definition at line 707 of file DataLayout.cpp.
References llvm::IntegerType::get(), and getPointerSizeInBits().
Referenced by llvm::IntrinsicLowering::AddPrototypes(), CastGEPIndices(), CoerceAvailableValueToLoadType(), llvm::ObjectSizeOffsetEvaluator::compute(), llvm::ConstantFoldCompareInstOperands(), convertPointerToIntegerType(), convertValue(), llvm::EmitFWrite(), llvm::EmitGEPOffset(), llvm::EmitMemChr(), llvm::EmitMemCmp(), llvm::EmitMemCpyChk(), llvm::EmitStrLen(), llvm::EmitStrNCmp(), llvm::EmitStrNLen(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::AArch64SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemset(), EvaluateGEPOffsetExpression(), llvm::SimplifyFortifiedLibCalls::fold(), GetConstantInt(), llvm::ScalarEvolution::getEffectiveSCEVType(), llvm::IRBuilderBase::getIntPtrTy(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), GetStoreValueForLoad(), llvm::FastISel::hasTrivialKill(), InstCombineLoadCast(), isEliminableCastPair(), llvm::CastInst::isNoopCast(), nvptx::LowerConstant(), lowerConstant(), llvm::IntrinsicLowering::LowerIntrinsicCall(), PerformHeapAllocSRoA(), ReadDataFromGlobal(), SimplifyBranchOnICmpChain(), stripAndComputeConstantOffsets(), SymbolicallyEvaluateGEP(), TryToOptimizeStoreOfMallocToGlobal(), llvm::InstCombiner::visitAllocaInst(), and llvm::PtrUseVisitor< SliceBuilder >::visitPtr().
Type * DataLayout::getIntPtrType | ( | Type * | Ty | ) | const |
getIntPtrType - Return an integer (vector of integer) type with size at least as big as that of a pointer of the given pointer (vector of pointer) type.
Definition at line 712 of file DataLayout.cpp.
References llvm::IntegerType::get(), llvm::VectorType::get(), llvm::Type::getContext(), getPointerTypeSizeInBits(), and llvm::Type::isPtrOrPtrVectorTy().
Type* llvm::DataLayout::getLargestLegalIntType | ( | LLVMContext & | C | ) | const [inline] |
getLargestLegalIntType - Return the largest legal integer type, or null if none are set.
Definition at line 414 of file DataLayout.h.
References llvm::Type::getIntNTy(), and getLargestLegalIntTypeSize().
getLargestLegalIntTypeSize - Return the size of largest legal integer type size, or 0 if none are set.
Definition at line 729 of file DataLayout.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), and llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by getLargestLegalIntType().
const char* llvm::DataLayout::getLinkerPrivateGlobalPrefix | ( | ) | const [inline] |
Definition at line 250 of file DataLayout.h.
References getPrivateGlobalPrefix().
Referenced by llvm::MachineFunction::getJTISymbol(), and getNameWithPrefixx().
const char * DataLayout::getManglingComponent | ( | const Triple & | T | ) | [static] |
Definition at line 155 of file DataLayout.cpp.
References llvm::Triple::getArch(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSBinFormatMachO(), llvm::Triple::isOSWindows(), and llvm::Triple::x86.
Referenced by computeDataLayout(), and getDataLayoutString().
unsigned DataLayout::getPointerABIAlignment | ( | unsigned | AS = 0 | ) | const |
Layout pointer alignment FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 588 of file DataLayout.cpp.
References llvm::PointerAlignElem::ABIAlign, llvm::PointerAlignElem::AddressSpace, and llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), and llvm::MachineJumpTableInfo::getEntryAlignment().
unsigned DataLayout::getPointerPrefAlignment | ( | unsigned | AS = 0 | ) | const |
Return target's alignment for stack-based pointers FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 597 of file DataLayout.cpp.
References llvm::PointerAlignElem::AddressSpace, llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::PointerAlignElem::PrefAlign.
Referenced by FindOptimalMemOpLowering(), and getOpenCLAlignment().
unsigned DataLayout::getPointerSize | ( | unsigned | AS = 0 | ) | const |
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 606 of file DataLayout.cpp.
References llvm::PointerAlignElem::AddressSpace, llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::PointerAlignElem::TypeByteWidth.
Referenced by llvm::DwarfCompileUnit::createGlobalVariableDIE(), llvm::AddressPool::emit(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::SystemZAsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::DwarfUnit::emitHeader(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::DIEInteger::EmitValue(), llvm::MachineJumpTableInfo::getEntrySize(), getPointerSizeInBits(), llvm::DIEEntry::getRefAddrSize(), llvm::MSP430TargetLowering::getReturnAddressFrameIndex(), llvm::TargetLoweringBase::getScalarShiftAmountTy(), llvm::AsmPrinter::GetSizeOfEncodedValue(), isTargetNullPtr(), LLVMPointerSize(), LLVMPointerSizeForAS(), llvm::DIEInteger::SizeOf(), llvm::DIEExpr::SizeOf(), llvm::DIELabel::SizeOf(), llvm::DIEDelta::SizeOf(), and llvm::DIELocList::SizeOf().
unsigned llvm::DataLayout::getPointerSizeInBits | ( | unsigned | AS = 0 | ) | const [inline] |
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 315 of file DataLayout.h.
References getPointerSize().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), DecomposeGEPExpression(), llvm::ExecutionEngine::getConstantValue(), getIntPtrType(), llvm::TargetLoweringBase::getPointerSizeInBits(), getTypeSizeInBits(), lle_X_sprintf(), nvptx::LowerConstant(), llvm::TargetLowering::ParseConstraints(), and llvm::Value::stripAndAccumulateInBoundsConstantOffsets().
unsigned llvm::DataLayout::getPointerTypeSize | ( | Type * | Ty | ) | const [inline] |
Definition at line 326 of file DataLayout.h.
References getPointerTypeSizeInBits().
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
unsigned DataLayout::getPointerTypeSizeInBits | ( | Type * | Ty | ) | const |
Layout pointer size, in bits, based on the type. If this function is called with a pointer type, then the type size of the pointer is returned. If this function is called with a vector of pointers, then the type size of the pointer is returned. This should only be called with a pointer or vector of pointers.
Definition at line 615 of file DataLayout.cpp.
References llvm::Type::getScalarType(), getTypeSizeInBits(), llvm::Type::isPointerTy(), and llvm::Type::isPtrOrPtrVectorTy().
Referenced by llvm::ObjectSizeOffsetVisitor::compute(), llvm::ConstantFoldInstOperands(), getBitWidth(), getIntPtrType(), getNaturalGEPWithType(), llvm::getOrEnforceKnownAlignment(), llvm::GetPointerBaseWithConstantOffset(), getPointerTypeSize(), IsConstantOffsetFromGlobal(), and lowerConstant().
unsigned DataLayout::getPreferredAlignment | ( | const GlobalVariable * | GV | ) | const |
getPreferredAlignment - Return the preferred alignment of the specified global. This includes an explicitly requested alignment (if the global has one).
Definition at line 774 of file DataLayout.cpp.
References getABITypeAlignment(), llvm::GlobalObject::getAlignment(), llvm::SequentialType::getElementType(), getPrefTypeAlignment(), llvm::GlobalValue::getType(), getTypeSizeInBits(), and llvm::GlobalVariable::hasInitializer().
Referenced by computeKnownBits(), getPreferredAlignmentLog(), LLVMPreferredAlignmentOfGlobal(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal().
unsigned DataLayout::getPreferredAlignmentLog | ( | const GlobalVariable * | GV | ) | const |
getPreferredAlignmentLog - Return the preferred alignment of the specified global, returned in log form. This includes an explicitly requested alignment (if the global has one).
Definition at line 798 of file DataLayout.cpp.
References getPreferredAlignment(), and llvm::Log2_32().
Referenced by getGVAlignmentLog2().
unsigned DataLayout::getPreferredTypeAlignmentShift | ( | Type * | Ty | ) | const |
getPreferredTypeAlignmentShift - Return the preferred alignment for the specified type, returned as log2 of the value (a shift amount).
Definition at line 701 of file DataLayout.cpp.
References getPrefTypeAlignment(), and llvm::Log2_32().
unsigned DataLayout::getPrefTypeAlignment | ( | Type * | Ty | ) | const |
getPrefTypeAlignment - Return the preferred stack/global alignment for the specified type. This is always at least as good as the ABI alignment.
Definition at line 697 of file DataLayout.cpp.
Referenced by llvm::SelectionDAG::CreateStackTemporary(), llvm::SelectionDAG::getConstantPool(), getOpenCLAlignment(), getPreferredAlignment(), getPreferredTypeAlignmentShift(), HandleByValArgument(), llvm::isSafeToLoadUnconditionally(), LLVMPreferredAlignmentOfType(), llvm::TargetLowering::LowerCallTo(), llvm::AMDGPUTargetLowering::LowerGlobalAddress(), ReplaceLoadVector(), llvm::FunctionLoweringInfo::set(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitLoadInst(), llvm::SelectionDAGBuilder::visitSPDescriptorParent(), and llvm::InstCombiner::visitStoreInst().
const char* llvm::DataLayout::getPrivateGlobalPrefix | ( | ) | const [inline] |
Definition at line 269 of file DataLayout.h.
References llvm_unreachable.
Referenced by llvm::ARMAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::MachineFunction::getJTISymbol(), llvm::AsmPrinter::GetJTSetSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), getLinkerPrivateGlobalPrefix(), getNameWithPrefixx(), llvm::MachineFunction::getPICBaseSymbol(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::MachineBasicBlock::getSymbol(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::AsmPrinter::GetTempSymbol(), llvm::MipsAsmPrinter::printOperand(), and llvm::AsmPrinter::PrintSpecial().
Type * DataLayout::getSmallestLegalIntType | ( | LLVMContext & | C, |
unsigned | Width = 0 |
||
) | const |
getSmallestLegalIntType - Return the smallest integer type with size at least as big as Width bits.
Definition at line 722 of file DataLayout.cpp.
References llvm::Type::getIntNTy().
std::string DataLayout::getStringRepresentation | ( | ) | const |
getStringRepresentation - Return the string representation of the DataLayout. This representation is in the same format accepted by the string constructor above.
Definition at line 525 of file DataLayout.cpp.
References llvm::sys::path::begin(), DefaultAlignments, llvm::SmallVectorBase::empty(), llvm::sys::path::end(), if(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::raw_string_ostream::str().
Referenced by LLVMCopyStringRepOfTargetData(), operator==(), and llvm::Module::setDataLayout().
const StructLayout * DataLayout::getStructLayout | ( | StructType * | Ty | ) | const |
getStructLayout - Return a StructLayout object, indicating the alignment of the struct, its size, and the offsets of its fields. Note that this information is lazily cached.
Definition at line 502 of file DataLayout.cpp.
References llvm::StructType::getNumElements(), and llvm::LibFunc::malloc.
Referenced by llvm::GEPOperator::accumulateConstantOffset(), computeArraySize(), llvm::ComputeValueVTs(), DecomposeGEPExpression(), llvm::EmitGEPOffset(), emitGlobalConstantStruct(), EvaluateGEPOffsetExpression(), getIndexedOffset(), getNaturalGEPRecursively(), GetOffsetFromIndex(), llvm::ScalarEvolution::getOffsetOfExpr(), getTypePartition(), getTypeSizeInBits(), HasPadding(), llvm::ExecutionEngine::InitializeMemory(), isGEPKnownNonNull(), LLVMElementAtOffset(), LLVMOffsetOfElement(), PerformHeapAllocSRoA(), ReadDataFromGlobal(), llvm::FastISel::selectGetElementPtr(), SRAGlobal(), stripAggregateTypeWrapping(), SymbolicallyEvaluateGEP(), and TryToOptimizeStoreOfMallocToGlobal().
uint64_t llvm::DataLayout::getTypeAllocSize | ( | Type * | Ty | ) | const [inline] |
getTypeAllocSize - Return the offset in bytes between successive objects of the specified type, including alignment padding. 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 370 of file DataLayout.h.
References getABITypeAlignment(), getTypeStoreSize(), and RoundUpAlignment().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), AddFastCallStdCallSuffix(), computeArraySize(), llvm::ComputeValueVTs(), DecomposeGEPExpression(), llvm::AsmPrinter::EmitConstantPool(), llvm::EmitGEPOffset(), llvm::AsmPrinter::EmitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), emitGlobalConstantStruct(), emitGlobalConstantVector(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::ExecutionEngine::EmitGlobalVariable(), llvm::SystemZAsmPrinter::EmitMachineConstantPoolValue(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::ARMAsmPrinter::EmitXXStructor(), EvaluateGEPOffsetExpression(), FoldReinterpretLoadFromConstPtr(), getGEPInductionOperand(), getIndexedOffset(), llvm::TargetLoweringObjectFile::getKindForGlobal(), getNaturalGEPRecursively(), getNaturalGEPWithOffset(), GetOffsetFromIndex(), llvm::NVPTXTargetLowering::getPrototype(), llvm::MachineConstantPoolEntry::getSectionKind(), llvm::ScalarEvolution::getSizeOfExpr(), llvm::SparcTargetLowering::getSRetArgSize(), getStrideFromPointer(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getTypeAllocSizeInBits(), getTypePartition(), INITIALIZE_TM_PASS(), llvm::ExecutionEngine::InitializeMemory(), llvm::InlineFunction(), isGEPKnownNonNull(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isRepeatedByteSequence(), isSafeToEliminateVarargsCast(), IsSmallObject(), isStridedPtr(), LLVMABISizeOfType(), llvm::NVPTXTargetLowering::LowerCall(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), nvptx::LowerConstant(), lowerConstant(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::AMDGPUTargetLowering::LowerGlobalAddress(), llvm::NVPTXTargetLowering::LowerReturn(), PerformHeapAllocSRoA(), ReadDataFromGlobal(), llvm::FastISel::selectGetElementPtr(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), llvm::FunctionLoweringInfo::set(), SRAGlobal(), stripAggregateTypeWrapping(), SymbolicallyEvaluateGEP(), TryToOptimizeStoreOfMallocToGlobal(), llvm::Interpreter::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitArgument(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
uint64_t llvm::DataLayout::getTypeAllocSizeInBits | ( | Type * | Ty | ) | const [inline] |
getTypeAllocSizeInBits - Return the offset in bits between successive objects of the specified type, including alignment padding; always a multiple of 8. 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 379 of file DataLayout.h.
References getTypeAllocSize().
Referenced by FoldBitCast(), FoldReinterpretLoadFromConstPtr(), getTypeSizeInBits(), HasPadding(), llvm::NVPTXTargetLowering::LowerCall(), nvptx::LowerConstant(), lowerConstant(), and llvm::NVPTXTargetLowering::LowerReturn().
uint64_t llvm::DataLayout::getTypeSizeInBits | ( | Type * | Ty | ) | const [inline] |
Size examples:
Type SizeInBits StoreSizeInBits AllocSizeInBits[*] ---- ---------- --------------- --------------- i1 1 8 8 i8 8 8 8 i19 19 24 32 i32 32 32 32 i100 100 104 128 i128 128 128 128 Float 32 32 32 Double 64 64 64 X86_FP80 80 80 96
[*] The alloc size depends on the alignment, and thus on the target. These values are for x86-32 linux. getTypeSizeInBits - Return the number of bits necessary to hold the specified type. For example, returns 36 for i36 and 80 for x86_fp80. The type passed must have a size (Type::isSized() must return true).
Definition at line 521 of file DataLayout.h.
References llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::SequentialType::getElementType(), llvm::Type::getIntegerBitWidth(), llvm::ArrayType::getNumElements(), llvm::VectorType::getNumElements(), llvm::Type::getPointerAddressSpace(), getPointerSizeInBits(), llvm::StructLayout::getSizeInBits(), getStructLayout(), getTypeAllocSizeInBits(), llvm::Type::getTypeID(), llvm::Type::HalfTyID, llvm::Type::IntegerTyID, llvm::Type::isSized(), llvm::Type::LabelTyID, llvm_unreachable, llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::Type::StructTyID, llvm::Type::VectorTyID, llvm::Type::X86_FP80TyID, and llvm::Type::X86_MMXTyID.
Referenced by AnalyzeLoadFromClobberingLoad(), AnalyzeLoadFromClobberingStore(), AnalyzeLoadFromClobberingWrite(), CanCoerceMustAliasedValueToLoad(), canConvertValue(), llvm::FastISel::canFoldAddIntoGEP(), CoerceAvailableValueToLoadType(), computeKnownBits(), ComputeNumSignBits(), ConstantFoldLoadThroughBitcast(), llvm::ExecutionEngine::getConstantValue(), GetMemInstValueForLoad(), getMemSetPatternValue(), getNaturalGEPRecursively(), getPointerTypeSizeInBits(), getPreferredAlignment(), GetStoreValueForLoad(), llvm::ScalarEvolution::getTypeSizeInBits(), getTypeStoreSize(), HasPadding(), InstCombineLoadCast(), InstCombineStoreToCast(), isIntegerWideningViable(), llvm::AArch64TargetLowering::isLegalAddressingMode(), isSimpleEnoughValueToCommitHelper(), isVectorPromotionViable(), llvm::AMDGPUTargetLowering::isZExtFree(), LLVMSizeOfTypeInBits(), llvm::TargetLowering::ParseConstraints(), stripAggregateTypeWrapping(), SymbolicallyEvaluateBinop(), and SymbolicallyEvaluateGEP().
uint64_t llvm::DataLayout::getTypeStoreSize | ( | Type * | Ty | ) | const [inline] |
getTypeStoreSize - Return the maximum number of bytes that may be overwritten by storing the specified type. For example, returns 5 for i36 and 10 for x86_fp80.
Definition at line 355 of file DataLayout.h.
References getTypeSizeInBits().
Referenced by AnalyzeLoadFromClobberingLoad(), CanShareConstantPoolEntry(), llvm::IRBuilder< true, TargetFolder >::CreateExtractInteger(), llvm::FastISel::createMachineMemOperandFor(), emitGlobalConstantFP(), extractInteger(), GetLoadValueForLoad(), getTypeAllocSize(), llvm::AliasAnalysis::getTypeStoreSize(), getTypeStoreSizeInBits(), HandleByValArgumentInit(), insertInteger(), llvm::Value::isDereferenceablePointer(), isDereferenceablePointer(), isIntegerWideningViable(), llvm::isSafeToLoadUnconditionally(), LLVMStoreSizeOfType(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::NVPTXLowerAggrCopies::runOnFunction(), and llvm::ExecutionEngine::StoreValueToMemory().
uint64_t llvm::DataLayout::getTypeStoreSizeInBits | ( | Type * | Ty | ) | const [inline] |
getTypeStoreSizeInBits - Return the maximum number of bits that may be overwritten by storing the specified type; always a multiple of 8. For example, returns 40 for i36 and 80 for x86_fp80.
Definition at line 362 of file DataLayout.h.
References getTypeStoreSize().
Referenced by llvm::Value::isDereferenceablePointer(), isIntegerWideningViable(), and isIntegerWideningViableForSlice().
bool llvm::DataLayout::hasLinkerPrivateGlobalPrefix | ( | ) | const [inline] |
Definition at line 246 of file DataLayout.h.
Referenced by llvm::AsmPrinter::EmitJumpTableInfo().
bool llvm::DataLayout::hasMicrosoftFastStdCallMangling | ( | ) | const [inline] |
Definition at line 242 of file DataLayout.h.
Referenced by llvm::Mangler::getNameWithPrefix().
void DataLayout::init | ( | const Module * | M | ) |
Definition at line 351 of file DataLayout.cpp.
References llvm::Module::getDataLayout(), and reset().
Referenced by DataLayout().
bool llvm::DataLayout::isBigEndian | ( | ) | const [inline] |
Definition at line 212 of file DataLayout.h.
Referenced by CoerceAvailableValueToLoadType(), CollectInsertionElements(), llvm::IRBuilder< true, TargetFolder >::CreateExtractInteger(), emitGlobalConstantFP(), emitGlobalConstantLargeInt(), extractInteger(), GetLoadValueForLoad(), getMemSetPatternValue(), insertInteger(), and OptimizeIntToFloatBitCast().
bool llvm::DataLayout::isIllegalInteger | ( | unsigned | Width | ) | const [inline] |
Definition at line 233 of file DataLayout.h.
References isLegalInteger().
bool llvm::DataLayout::isLegalInteger | ( | unsigned | Width | ) | const [inline] |
isLegalInteger - This function returns true if the specified type is known to be a native integer type supported by the CPU. For example, i64 is not native on most 32-bit CPUs and i37 is not native on any known one. This returns false if the integer width is not legal.
The width is specified in bits.
Definition at line 226 of file DataLayout.h.
Referenced by llvm::IVUsers::AddUsersImpl(), FindLoopCounter(), isIllegalInteger(), isIntegerWideningViable(), visitIVCast(), and llvm::InstCombiner::visitPHINode().
bool llvm::DataLayout::isLittleEndian | ( | ) | const [inline] |
Layout endianness...
Definition at line 211 of file DataLayout.h.
Referenced by llvm::DwarfUnit::addConstantFPValue(), llvm::DwarfUnit::addConstantValue(), llvm::ConstantFoldLoadFromConstPtr(), FoldBitCast(), FoldReinterpretLoadFromConstPtr(), llvm::TargetInstrInfo::getStackSlotRange(), GetStoreValueForLoad(), llvm::PPC::getVSPLTImmediate(), llvm::AArch64Subtarget::isLittleEndian(), llvm::PPC::isVMRGHShuffleMask(), llvm::PPC::isVMRGLShuffleMask(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), LLVMByteOrder(), operator=(), ReadDataFromGlobal(), and llvm::TargetLoweringBase::TargetLoweringBase().
bool llvm::DataLayout::operator!= | ( | const DataLayout & | Other | ) | const [inline] |
Definition at line 203 of file DataLayout.h.
DataLayout& llvm::DataLayout::operator= | ( | const DataLayout & | DL | ) | [inline] |
Definition at line 191 of file DataLayout.h.
References isLittleEndian().
bool DataLayout::operator== | ( | const DataLayout & | Other | ) | const |
Definition at line 359 of file DataLayout.cpp.
References getStringRepresentation(), and llvm::MipsISD::Ret.
void DataLayout::reset | ( | StringRef | LayoutDescription | ) |
Parse a data layout string (with fallback to default values).
Definition at line 178 of file DataLayout.cpp.
References DefaultAlignments.
Referenced by DataLayout(), init(), and llvm::Module::setDataLayout().
static UIntTy llvm::DataLayout::RoundUpAlignment | ( | UIntTy | Val, |
unsigned | Alignment | ||
) | [inline, static] |
RoundUpAlignment - Round the specified value up to the next alignment boundary specified by Alignment. For example, 7 rounded up to an alignment boundary of 4 is 8. 8 rounded up to the alignment boundary of 4 is 8 because it is already aligned.
Definition at line 447 of file DataLayout.h.
Referenced by getTypeAllocSize().