|
LLVM
10.0.0
|
A parsed version of the target data layout string in and methods for querying it. More...
#include "llvm/IR/DataLayout.h"
Public Types | |
| enum | FunctionPtrAlignType { FunctionPtrAlignType::Independent, FunctionPtrAlignType::MultipleOfFunctionAlign } |
Public Member Functions | |
| DataLayout (StringRef LayoutDescription) | |
| Constructs a DataLayout from a specification string. See reset(). More... | |
| DataLayout (const Module *M) | |
| Initialize target data from properties stored in the module. More... | |
| DataLayout (const DataLayout &DL) | |
| ~DataLayout () | |
| DataLayout & | operator= (const DataLayout &DL) |
| bool | operator== (const DataLayout &Other) const |
| bool | operator!= (const DataLayout &Other) const |
| void | init (const Module *M) |
| void | reset (StringRef LayoutDescription) |
| Parse a data layout string (with fallback to default values). More... | |
| bool | isLittleEndian () const |
| Layout endianness... More... | |
| bool | isBigEndian () const |
| const std::string & | getStringRepresentation () const |
| Returns the string representation of the DataLayout. More... | |
| bool | isDefault () const |
| Test if the DataLayout was constructed from an empty string. More... | |
| bool | isLegalInteger (uint64_t Width) const |
| Returns true if the specified type is known to be a native integer type supported by the CPU. More... | |
| bool | isIllegalInteger (uint64_t Width) const |
| bool | exceedsNaturalStackAlignment (Align Alignment) const |
| Returns true if the given alignment exceeds the natural stack alignment. More... | |
| Align | getStackAlignment () const |
| unsigned | getAllocaAddrSpace () const |
| MaybeAlign | getFunctionPtrAlign () const |
| Returns the alignment of function pointers, which may or may not be related to the alignment of functions. More... | |
| FunctionPtrAlignType | getFunctionPtrAlignType () const |
| Return the type of function pointer alignment. More... | |
| unsigned | getProgramAddressSpace () const |
| bool | hasMicrosoftFastStdCallMangling () const |
| bool | doNotMangleLeadingQuestionMark () const |
| Returns true if symbols with leading question marks should not receive IR mangling. More... | |
| bool | hasLinkerPrivateGlobalPrefix () const |
| StringRef | getLinkerPrivateGlobalPrefix () const |
| char | getGlobalPrefix () const |
| StringRef | getPrivateGlobalPrefix () const |
| bool | fitsInLegalInteger (unsigned Width) const |
| Returns true if the specified type fits in a native integer type supported by the CPU. More... | |
| Align | getPointerABIAlignment (unsigned AS) const |
| Layout pointer alignment. More... | |
| Align | 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. More... | |
| unsigned | getPointerSize (unsigned AS=0) const |
| Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updated. More... | |
| unsigned | getMaxPointerSize () const |
| Returns the maximum pointer size over all address spaces. More... | |
| unsigned | getIndexSize (unsigned AS) const |
| ArrayRef< unsigned > | getNonIntegralAddressSpaces () const |
| Return the address spaces containing non-integral pointers. More... | |
| bool | isNonIntegralAddressSpace (unsigned AddrSpace) const |
| bool | isNonIntegralPointerType (PointerType *PT) const |
| bool | isNonIntegralPointerType (Type *Ty) const |
| unsigned | getPointerSizeInBits (unsigned AS=0) const |
| Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients are updated. More... | |
| unsigned | getMaxPointerSizeInBits () const |
| Returns the maximum pointer size over all address spaces. More... | |
| unsigned | getIndexSizeInBits (unsigned AS) const |
| Size in bits of index used for address calculation in getelementptr. More... | |
| unsigned | getPointerTypeSizeInBits (Type *) const |
| Layout pointer size, in bits, based on the type. More... | |
| unsigned | getIndexTypeSizeInBits (Type *Ty) const |
| Layout size of the index used in GEP calculation. More... | |
| unsigned | getPointerTypeSize (Type *Ty) const |
| TypeSize | getTypeSizeInBits (Type *Ty) const |
| Size examples: More... | |
| TypeSize | getTypeStoreSize (Type *Ty) const |
| Returns the maximum number of bytes that may be overwritten by storing the specified type. More... | |
| TypeSize | getTypeStoreSizeInBits (Type *Ty) const |
| Returns the maximum number of bits that may be overwritten by storing the specified type; always a multiple of 8. More... | |
| bool | typeSizeEqualsStoreSize (Type *Ty) const |
| Returns true if no extra padding bits are needed when storing the specified type. More... | |
| TypeSize | getTypeAllocSize (Type *Ty) const |
| Returns the offset in bytes between successive objects of the specified type, including alignment padding. More... | |
| TypeSize | getTypeAllocSizeInBits (Type *Ty) const |
| Returns the offset in bits between successive objects of the specified type, including alignment padding; always a multiple of 8. More... | |
| unsigned | getABITypeAlignment (Type *Ty) const |
| Returns the minimum ABI-required alignment for the specified type. More... | |
| Align | getValueOrABITypeAlignment (MaybeAlign Alignment, Type *Ty) const |
Helper function to return Alignment if it's set or the result of getABITypeAlignment(Ty), in any case the result is a valid alignment. More... | |
| Align | getABIIntegerTypeAlignment (unsigned BitWidth) const |
| Returns the minimum ABI-required alignment for an integer type of the specified bitwidth. More... | |
| unsigned | getPrefTypeAlignment (Type *Ty) const |
| Returns the preferred stack/global alignment for the specified type. More... | |
| IntegerType * | getIntPtrType (LLVMContext &C, unsigned AddressSpace=0) const |
| Returns an integer type with size at least as big as that of a pointer in the given address space. More... | |
| Type * | getIntPtrType (Type *) const |
| Returns 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. More... | |
| Type * | getSmallestLegalIntType (LLVMContext &C, unsigned Width=0) const |
| Returns the smallest integer type with size at least as big as Width bits. More... | |
| Type * | getLargestLegalIntType (LLVMContext &C) const |
| Returns the largest legal integer type, or null if none are set. More... | |
| unsigned | getLargestLegalIntTypeSizeInBits () const |
| Returns the size of largest legal integer type size, or 0 if none are set. More... | |
| Type * | getIndexType (Type *PtrTy) const |
| Returns the type of a GEP index. More... | |
| int64_t | getIndexedOffsetInType (Type *ElemTy, ArrayRef< Value *> Indices) const |
| Returns the offset from the beginning of the type for the specified indices. More... | |
| const StructLayout * | getStructLayout (StructType *Ty) const |
| Returns a StructLayout object, indicating the alignment of the struct, its size, and the offsets of its fields. More... | |
| unsigned | getPreferredAlignment (const GlobalVariable *GV) const |
| Returns the preferred alignment of the specified global. More... | |
| unsigned | getPreferredAlignmentLog (const GlobalVariable *GV) const |
| Returns the preferred alignment of the specified global, returned in log form. More... | |
Static Public Member Functions | |
| static const char * | getManglingComponent (const Triple &T) |
A parsed version of the target data layout string in and 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 111 of file DataLayout.h.
|
strong |
| Enumerator | |
|---|---|
| Independent | The function pointer alignment is independent of the function alignment. |
| MultipleOfFunctionAlign | The function pointer alignment is a multiple of the function alignment. |
Definition at line 113 of file DataLayout.h.
|
inlineexplicit |
Constructs a DataLayout from a specification string. See reset().
Definition at line 195 of file DataLayout.h.
Initialize target data from properties stored in the module.
Definition at line 456 of file DataLayout.cpp.
References llvm::cl::init().
|
inline |
Definition at line 202 of file DataLayout.h.
| DataLayout::~DataLayout | ( | ) |
Definition at line 609 of file DataLayout.cpp.
References clear().
|
inline |
Returns true if symbols with leading question marks should not receive IR mangling.
True for Windows mangling modes.
Definition at line 294 of file DataLayout.h.
Referenced by llvm::Mangler::getNameWithPrefix(), and getNameWithPrefixImpl().
Returns true if the given alignment exceeds the natural stack alignment.
Definition at line 264 of file DataLayout.h.
Referenced by enforceKnownAlignment(), and getMemcpyLoadsAndStores().
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 343 of file DataLayout.h.
References getMaxPointerSize(), and getPointerSize().
Referenced by llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), and ReduceSwitchRange().
Returns the minimum ABI-required alignment for an integer type of the specified bitwidth.
getABIIntegerTypeAlignment - Return the minimum ABI-required alignment for an integer type of the specified bitwidth.
Definition at line 761 of file DataLayout.cpp.
References llvm::INTEGER_ALIGN.
Referenced by llvm::MachineJumpTableInfo::getEntryAlignment().
Returns the minimum ABI-required alignment for the specified type.
Definition at line 755 of file DataLayout.cpp.
References llvm::StructLayout::getAlignment(), and llvm::Align::value().
Referenced by llvm::AMDGPUMachineFunction::allocateLDSGlobal(), llvm::TargetLoweringBase::allowsMemoryAccessForAlignment(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::analyzeStandardArguments(), buildPCRelGlobalAddress(), llvm::FastISel::createMachineMemOperandFor(), llvm::createScalarizerPass(), dump(), findMatchingInlineAsmOperand(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::TargetLoweringBase::getABIAlignmentForCallingConv(), getBaseAlign(), getBuildPairElt(), llvm::X86TargetLowering::getByValTypeAlignment(), llvm::TargetLoweringBase::getByValTypeAlignment(), llvm::SelectionDAG::getConstantPool(), llvm::SelectionDAG::getEVTAlignment(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), llvm::Value::getPointerAlignment(), llvm::NVPTXTargetLowering::getPrototype(), getTypePartition(), INITIALIZE_PASS(), isCallPromotable(), isKnownTypeIdMember(), llvm::HexagonTargetLowering::isLegalAddressingMode(), isSupportedType(), isWorthFoldingADDlow(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::NVPTXTargetLowering::LowerReturn(), mergeConditionalStoreToAddress(), mergeInlinedArrayAllocas(), moveUp(), numVectorEltsOrZero(), parseTexFail(), llvm::PPCTargetLowering::PerformDAGCombine(), promotedOpIsNUW(), llvm::promoteLoopAccessesToScalars(), llvm::CallLowering::setArgFlags(), ShrinkLoadReplaceStoreWithStore(), SRAGlobal(), tryToElideArgumentCopy(), TypeSizeToSizeIndex(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAtomicRMWInst(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 273 of file DataLayout.h.
Referenced by llvm::IRBuilder< TargetFolder >::CreateAlloca(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), doPromotion(), findUnwindDestinations(), llvm::TargetMachine::getAllocaPointerSize(), getFirstNonAllocaInTheEntryBlock(), llvm::TargetLoweringBase::getFrameIndexTy(), llvm::getInlineCost(), llvm::MachinePointerInfo::getUnknownStack(), HandleByValArgument(), INITIALIZE_PASS(), insertLifetimeMarkersSurroundingCall(), isContiguous(), MarkBlocksLiveIn(), processInternalGlobal(), relocationViaAlloca(), RetagMask(), and tryToElideArgumentCopy().
|
inline |
Returns the alignment of function pointers, which may or may not be related to the alignment of functions.
Definition at line 278 of file DataLayout.h.
Referenced by llvm::Value::getPointerAlignment().
|
inline |
Return the type of function pointer alignment.
Definition at line 282 of file DataLayout.h.
Referenced by llvm::Value::getPointerAlignment().
|
inline |
Definition at line 306 of file DataLayout.h.
References llvm_unreachable.
Referenced by llvm::emitLinkerFlagsForGlobalCOFF(), llvm::Mangler::getNameWithPrefix(), and getNameWithPrefixImpl().
Returns the offset from the beginning of the type for the specified indices.
Note that this takes the element type, not the pointer type. This is used to implement getelementptr.
Definition at line 806 of file DataLayout.cpp.
References assert(), llvm::gep_type_begin(), llvm::gep_type_end(), llvm::StructLayout::getElementOffset(), llvm::generic_gep_type_iterator< ItTy >::getIndexedType(), llvm::generic_gep_type_iterator< ItTy >::getOperand(), llvm::generic_gep_type_iterator< ItTy >::getStructTypeOrNull(), llvm::Value::getType(), and llvm::Type::isIntegerTy().
Referenced by llvm::ConstantFoldLoadFromConstPtr(), findLoadCallsAtConstantOffset(), getOffsetFromIndices(), and llvm::sroa::AllocaSliceRewriter::visit().
Definition at line 678 of file DataLayout.cpp.
Size in bits of index used for address calculation in getelementptr.
Definition at line 402 of file DataLayout.h.
Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::GISelKnownBits::computeKnownBitsImpl(), llvm::IRPosition::getAttrs(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getEstimatedNumberOfCaseClusters(), getTypePartition(), llvm::isConsecutiveAccess(), llvm::TargetLoweringBase::rangeFitsInWord(), SimplifyGEPInst(), and llvm::sroa::AllocaSliceRewriter::visit().
Returns the type of a GEP index.
If it was not specified explicitly, it will be the integer type of the pointer width - IntPtrType.
Definition at line 796 of file DataLayout.cpp.
References assert(), llvm::IntegerType::get(), llvm::VectorType::get(), llvm::Type::getContext(), and llvm::Type::isPtrOrPtrVectorTy().
Referenced by llvm::ObjectSizeOffsetEvaluator::compute(), llvm::ConstantFoldLoadFromConstPtr(), llvm::EmitGEPOffset(), stripAndComputeConstantOffsets(), and llvm::PtrUseVisitor< SliceBuilder >::visitPtr().
Layout size of the index used in GEP calculation.
The function should be called with pointer or vector of pointers type.
Definition at line 687 of file DataLayout.cpp.
References llvm::AGGREGATE_ALIGN, llvm::Type::ArrayTyID, assert(), llvm::Type::DoubleTyID, llvm::FLOAT_ALIGN, llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::StructLayout::getAlignment(), llvm::Type::getScalarType(), llvm::Type::getTypeID(), llvm::Type::HalfTyID, llvm::INTEGER_ALIGN, llvm::Type::IntegerTyID, llvm::Type::isPtrOrPtrVectorTy(), llvm::Type::isSized(), llvm::Type::LabelTyID, llvm_unreachable, llvm::max(), llvm::Align::None(), llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::Type::StructTyID, llvm::VECTOR_ALIGN, llvm::Type::VectorTyID, llvm::Type::X86_FP80TyID, and llvm::Type::X86_MMXTyID.
Referenced by llvm::detail::PtrUseVisitorBase::adjustOffsetForGEP(), llvm::ObjectSizeOffsetVisitor::compute(), getAsConstantIndexedAddress(), getNaturalGEPWithType(), llvm::GetPointerBaseWithConstantOffset(), llvm::IsConstantOffsetFromGlobal(), isSafePHIToSpeculate(), llvm::isSafeToLoadUnconditionally(), llvm::Value::stripAndAccumulateConstantOffsets(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::ObjectSizeOffsetVisitor::visitGEPOperator().
| IntegerType * DataLayout::getIntPtrType | ( | LLVMContext & | C, |
| unsigned | AddressSpace = 0 |
||
| ) | const |
Returns an integer type with size at least as big as that of a pointer in the given address space.
Definition at line 769 of file DataLayout.cpp.
References llvm::IntegerType::get().
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::convertPointerToIntegerType(), convertValue(), createMaskInstrs(), llvm::createThreadSanitizerLegacyPassPass(), llvm::emitBCmp(), llvm::emitCalloc(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), llvm::emitMalloc(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitStrLen(), llvm::emitStrNCmp(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), evaluateGEPOffsetExpression(), getBoundsCheckCond(), GetConstantInt(), llvm::IRBuilderBase::getIntPtrTy(), GetRMWLibcall(), llvm::VNCoercion::getStoreValueForLoadHelper(), INITIALIZE_PASS(), llvm::DenseMapInfo< VTableSlotSummary >::isEqual(), llvm::CastInst::isNoopCast(), isWordAligned(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::AsmPrinter::lowerConstant(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), matchesOr(), optimizeMemCmpConstantSize(), PerformHeapAllocSRoA(), simplifyAllocaArraySize(), SimplifyCastInst(), tryToOptimizeStoreOfMallocToGlobal(), and unifyBitWidth().
Returns 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 774 of file DataLayout.cpp.
References assert(), llvm::IntegerType::get(), llvm::VectorType::get(), llvm::Type::getContext(), and llvm::Type::isPtrOrPtrVectorTy().
|
inline |
Returns the largest legal integer type, or null if none are set.
Definition at line 536 of file DataLayout.h.
References llvm::Type::getIntNTy().
| unsigned DataLayout::getLargestLegalIntTypeSizeInBits | ( | ) | const |
Returns the size of largest legal integer type size, or 0 if none are set.
Definition at line 791 of file DataLayout.cpp.
Referenced by canUseSizedAtomicCall(), CC_RISCV(), and despeculateCountZeros().
|
inline |
Definition at line 300 of file DataLayout.h.
Referenced by llvm::MachineFunction::getJTISymbol(), and getNameWithPrefixImpl().
Definition at line 151 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::getMaxPointerSize | ( | ) | const |
Returns the maximum pointer size over all address spaces.
Definition at line 663 of file DataLayout.cpp.
References llvm::max(), and P.
|
inline |
Returns the maximum pointer size over all address spaces.
Definition at line 397 of file DataLayout.h.
References getMaxPointerSize().
Referenced by getMaxPointerSize().
Return the address spaces containing non-integral pointers.
Pointers in this address space don't have a well-defined bitwise representation.
Definition at line 371 of file DataLayout.h.
Referenced by getParentPad().
Layout pointer alignment.
Definition at line 636 of file DataLayout.cpp.
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), and llvm::MachineJumpTableInfo::getEntryAlignment().
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 645 of file DataLayout.cpp.
Referenced by llvm::AsmPrinter::EmitSpecialLLVMGlobal(), and getOpenCLAlignment().
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 654 of file DataLayout.cpp.
Referenced by addByteCountSuffix(), llvm::DwarfCompileUnit::addLocationAttribute(), canTurnIntoCOPY(), llvm::AsmPrinter::doFinalization(), llvm::AddressPool::emit(), EmitCamlGlobal(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::TargetMachine::getAllocaPointerSize(), llvm::MachineJumpTableInfo::getEntrySize(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::AddressPool::getIndex(), llvm::TargetMachine::getPointerSize(), llvm::TargetMachine::getProgramPointerSize(), llvm::MSP430TargetLowering::getReturnAddressFrameIndex(), llvm::AsmPrinter::GetSizeOfEncodedValue(), llvm::CallLowering::handleAssignments(), isTargetNullPtr(), and llvm::MSP430TargetLowering::LowerRETURNADDR().
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients are updated.
Definition at line 392 of file DataLayout.h.
References getPointerSize().
Referenced by llvm::FunctionComparator::cmpOperations(), llvm::computeSignatureVTs(), llvm::InstructionSelector::executeMatchTable(), llvm::StackSafetyInfo::FunctionInfo::FunctionInfo(), llvm::getCallsiteCost(), GetCtorAndDtorPriority(), llvm::getLLTForType(), getMaxPointerSize(), getNoopInput(), llvm::TargetLoweringBase::getPointerMemTy(), llvm::TargetMachine::getPointerSizeInBits(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getScalarShiftAmountTy(), llvm::X86TTIImpl::getUserCost(), instrumentMaskedLoadOrStore(), llvm::isBytewiseValue(), llvm::MachinePointerInfo::isDereferenceable(), isKnownTypeIdMember(), lle_X_sprintf(), llvm::X86CallLowering::lowerReturn(), matchesOr(), llvm::TargetLowering::ParseConstraints(), pickOpcodeForVT(), SimplifyGEPInst(), unpackFromMemLoc(), verifyAddrSpace(), llvm::Interpreter::visitAShr(), llvm::WinException::WinException(), and llvm::X86CallLowering::X86CallLowering().
Definition at line 417 of file DataLayout.h.
Referenced by llvm::AsmPrinter::EmitGlobalVariable().
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 671 of file DataLayout.cpp.
References assert(), llvm::Type::getScalarType(), and llvm::Type::isPtrOrPtrVectorTy().
Referenced by llvm::ConstantFoldCastOperand(), ConvertDoubleToBytes(), llvm::copyRangeMetadata(), getBitWidth(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::SelectionDAG::getGlobalAddress(), llvm::TargetTransformInfoImplBase::getOperationCost(), GetRangeFromMetadata(), llvm::CastInst::isBitOrNoopPointerCastable(), and llvm::isDereferenceableAndAlignedPointer().
| unsigned DataLayout::getPreferredAlignment | ( | const GlobalVariable * | GV | ) | const |
Returns the preferred alignment of the specified global.
getPreferredAlignment - Return the preferred alignment of the specified global.
This includes an explicitly requested alignment (if the global has one).
Definition at line 837 of file DataLayout.cpp.
References llvm::GlobalObject::getAlignment(), llvm::GlobalValue::getValueType(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalObject::hasSection(), and llvm::max().
Referenced by getAlignment(), llvm::AsmPrinter::getGVAlignment(), llvm::Value::getPointerAlignment(), promoteToConstantPool(), selectELFSectionForGlobal(), llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(), and llvm::ExecutionEngine::~ExecutionEngine().
| unsigned DataLayout::getPreferredAlignmentLog | ( | const GlobalVariable * | GV | ) | const |
Returns the preferred alignment of the specified global, returned in log form.
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 875 of file DataLayout.cpp.
References llvm::Log2_32().
Returns the preferred stack/global alignment for the specified type.
This is always at least as good as the ABI alignment.
Definition at line 765 of file DataLayout.cpp.
References llvm::StructLayout::getAlignment(), and llvm::Align::value().
Referenced by llvm::SelectionDAG::CreateStackTemporary(), llvm::NVPTXAsmPrinter::doFinalization(), emitPostSt(), llvm::SelectionDAG::getConstantPool(), getLaneCopyOpcode(), getOpenCLAlignment(), llvm::Value::getPointerAlignment(), GetRMWLibcall(), HandleByValArgument(), optimizeMemCmpConstantSize(), ReplaceLoadVector(), llvm::ARMTargetLowering::ReplaceNodeResults(), scalarizeBinOpOfSplats(), and llvm::FunctionLoweringInfo::set().
|
inline |
Definition at line 320 of file DataLayout.h.
References llvm_unreachable.
Referenced by EmitHiLo(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::ARMAsmPrinter::GetCPISymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::MachineFunction::getJTISymbol(), llvm::AsmPrinter::GetJTSetSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::PPCFunctionInfo::getLocalEPSymbol(), getNameWithPrefixImpl(), llvm::MachineFunction::getPICBaseSymbol(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), LowerWRITE_REGISTER(), llvm::MipsAsmPrinter::printOperand(), and llvm::AsmPrinter::PrintSpecial().
|
inline |
Definition at line 286 of file DataLayout.h.
Referenced by AddCalls(), computeAddrSpace(), llvm::Function::Create(), createGlobalFwdRef(), forEachUser(), llvm::LLParser::getContext(), llvm::Module::getOrInsertFunction(), llvm::TargetMachine::getProgramPointerSize(), maybePrintCallAddrSpace(), and maybePrintComdat().
| Type * DataLayout::getSmallestLegalIntType | ( | LLVMContext & | C, |
| unsigned | Width = 0 |
||
| ) | const |
Returns the smallest integer type with size at least as big as Width bits.
Definition at line 784 of file DataLayout.cpp.
References llvm::Type::getIntNTy().
Referenced by getRelevantOperands().
|
inline |
Definition at line 268 of file DataLayout.h.
References assert().
Referenced by CC_ARM_AAPCS_Custom_Aggregate(), finishStackBlock(), and llvm::ARMTargetLowering::getABIAlignmentForCallingConv().
|
inline |
Returns the string representation of the DataLayout.
This representation is in the same format accepted by the string constructor above. This should not be used to compare two DataLayout as different string can represent the same layout.
Definition at line 240 of file DataLayout.h.
Referenced by llvm::Module::getDataLayoutStr().
| const StructLayout * DataLayout::getStructLayout | ( | StructType * | Ty | ) | const |
Returns 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 613 of file DataLayout.cpp.
References llvm::StructType::getNumElements(), and llvm::safe_malloc().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), aliasSameBasePointerGEPs(), computeArraySize(), ComputePTXValueVTs(), llvm::computeValueLLTs(), llvm::ComputeValueVTs(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::EmitGEPOffset(), emitGlobalConstantStruct(), evaluateGEPOffsetExpression(), findFuncPointers(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), getMaxPointerSize(), getNaturalGEPRecursively(), getOffsetFromIndex(), llvm::getPointerAtOffset(), getTypePartition(), getUniformBase(), isDenselyPacked(), PerformHeapAllocSRoA(), AllocaSlices::SliceBuilder::SliceBuilder(), splitGlobal(), SRAGlobal(), stripAggregateTypeWrapping(), tryToOptimizeStoreOfMallocToGlobal(), unpackLoadToAggregate(), unpackStoreToAggregate(), and llvm::Interpreter::visitAllocaInst().
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 486 of file DataLayout.h.
References llvm::alignTo().
Referenced by llvm::GEPOperator::accumulateConstantOffset(), addByteCountSuffix(), llvm::LoopAccessInfo::addRuntimeChecks(), llvm::AMDGPUMachineFunction::allocateLDSGlobal(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::analyzeStandardArguments(), branchMaxOffsets(), canReplaceGEPIdxWithZero(), CC_RISCV(), computeArraySize(), llvm::computeValueLLTs(), llvm::ComputeValueVTs(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::createAMDGPUFunctionInliningPass(), dump(), llvm::AsmPrinter::EmitConstantPool(), llvm::EmitGEPOffset(), llvm::AsmPrinter::EmitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), emitGlobalConstantStruct(), emitGlobalConstantVector(), llvm::AsmPrinter::emitGlobalGOTEquivs(), llvm::AMDGPUAsmPrinter::EmitGlobalVariable(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::SystemZAsmPrinter::EmitMachineConstantPoolValue(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), emitPostSt(), llvm::ARMAsmPrinter::EmitXXStructor(), evaluateGEPOffsetExpression(), findArgumentCopyElisionCandidates(), findFuncPointers(), getAllocaSizeInBytes(), GetCtorAndDtorPriority(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::getGEPInductionOperand(), getLaneCopyOpcode(), getMaxPointerSize(), getMinVisibility(), getNaturalGEPRecursively(), getNaturalGEPWithOffset(), getOffsetFromIndex(), getOpenCLAlignment(), llvm::getPointerAtOffset(), llvm::NVPTXTargetLowering::getPrototype(), llvm::MachineConstantPoolEntry::getSectionKind(), getTypePartition(), getUniformBase(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), hasIrregularType(), hasUndefContents(), instrumentMaskedLoadOrStore(), isCallPromotable(), llvm::RISCVELFTargetObjectFile::isConstantInSmallSection(), llvm::LanaiTargetObjectFile::isConstantInSmallSection(), llvm::MipsTargetObjectFile::IsConstantInSmallSection(), llvm::RISCVELFTargetObjectFile::isGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::InductionDescriptor::isInductionPHI(), isKnownTypeIdMember(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isObjectSizeLessThanOrEq(), isSafeDependenceDistance(), isSafeToEliminateVarargsCast(), IsSmallObject(), llvm::NVPTXTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall_32(), llvm::AsmPrinter::lowerConstant(), llvm::X86TargetLowering::markLibCallAttributes(), matchesOr(), mayTailCallThisCC(), moveUp(), performGlobalAddressCombine(), PerformHeapAllocSRoA(), promoteToConstantPool(), replaceFrameSize(), llvm::ARMTargetLowering::ReplaceNodeResults(), RetagMask(), scalarizeBinOpOfSplats(), llvm::FunctionLoweringInfo::set(), llvm::CallLowering::setArgFlags(), llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection(), SimplifyGEPInst(), AllocaSlices::SliceBuilder::SliceBuilder(), splitRetconCoroutine(), SRAGlobal(), StackMallocSizeClass(), stripAggregateTypeWrapping(), tryToElideArgumentCopy(), tryToOptimizeStoreOfMallocToGlobal(), TypeSizeToSizeIndex(), unifyBitWidth(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::updateIndexWPDForExports(), llvm::Interpreter::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitArgument(), llvm::ObjectSizeOffsetVisitor::visitGlobalVariable(), VisitGlobalVariableForEmission(), and llvm::ExecutionEngine::~ExecutionEngine().
Returns the offset in bits between successive objects of the specified type, including alignment padding; always a multiple of 8.
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 96 or 128 for x86_fp80, depending on alignment.
Definition at line 499 of file DataLayout.h.
Referenced by ConvertDoubleToBytes(), llvm::AllocaInst::getAllocationSizeInBits(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), hasIrregularType(), isDenselyPacked(), isRepeatedByteSequence(), llvm::NVPTXTargetLowering::LowerCall(), llvm::AsmPrinter::lowerConstant(), llvm::NVPTXTargetLowering::LowerReturn(), SRAGlobal(), TryToShrinkGlobalToBoolean(), and valueCoversEntireFragment().
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. Returns the number of bits necessary to hold 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 36 for i36 and 80 for x86_fp80. The type passed must have a size (Type::isSized() must return true).
Definition at line 624 of file DataLayout.h.
References llvm::Type::ArrayTyID, assert(), llvm::Type::DoubleTyID, llvm::TypeSize::Fixed(), llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::VectorType::getElementCount(), llvm::SequentialType::getElementType(), llvm::Type::getIntegerBitWidth(), llvm::SequentialType::getNumElements(), llvm::Type::getPointerAddressSpace(), llvm::getSizeInBits(), llvm::Type::getTypeID(), llvm::Type::HalfTyID, llvm::Type::IntegerTyID, llvm::Type::isSized(), llvm::Type::LabelTyID, llvm_unreachable, llvm::ElementCount::Min, llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::Type::StructTyID, llvm::Type::VectorTyID, llvm::Type::X86_FP80TyID, and llvm::Type::X86_MMXTyID.
Referenced by llvm::sroa::AllocaSliceRewriter::AllocaSliceRewriter(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), llvm::VNCoercion::analyzeLoadFromClobberingWrite(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), llvm::FastISel::canFoldAddIntoGEP(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), computeRecurrenceType(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), generateLoopLatchCheck(), llvm::getCallsiteCost(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::RISCVTTIImpl::getIntImmCost(), llvm::getLLTForType(), getMemCmpLoad(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMemSetPatternValue(), getNaturalGEPRecursively(), getNumBytes(), llvm::AArch64TargetLowering::getNumInterleavedAccesses(), llvm::ARMTargetLowering::getNumInterleavedAccesses(), llvm::TargetTransformInfoImplBase::getOperationCost(), llvm::GCNTTIImpl::getShuffleCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getTypePartition(), llvm::HexagonTTIImpl::getUserCost(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::GCNTTIImpl::getVectorInstrCost(), llvm::R600TTIImpl::getVectorInstrCost(), hasIrregularType(), isBitCastSemanticsPreserving(), isContiguous(), isDenselyPacked(), isIntegerWideningViable(), llvm::AArch64TargetLowering::isLegalAddressingMode(), llvm::ARMTargetLowering::isLegalInterleavedAccessType(), llvm::AArch64TargetLowering::isLegalInterleavedAccessType(), isLoadInvariantInLoop(), isSafeToTruncateWideIVType(), isSimpleEnoughValueToCommitHelper(), isVectorPromotionViable(), llvm::TargetLowering::ParseConstraints(), processDbgDeclares(), promotedOpIsNUW(), SimplifyGEPInst(), SimplifyICmpInst(), splitMergedValStore(), stripAggregateTypeWrapping(), TypeSizeToSizeIndex(), and llvm::sroa::AllocaSliceRewriter::visit().
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 454 of file DataLayout.h.
References llvm::TypeSize::getKnownMinSize(), and llvm::TypeSize::isScalable().
Referenced by aliasSameBasePointerGEPs(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), CanShareConstantPoolEntry(), llvm::IRBuilder< TargetFolder >::CreateExtractInteger(), llvm::FastISel::createMachineMemOperandFor(), createMaskInstrs(), llvm::createScalarizerPass(), llvm::NVPTXAsmPrinter::doFinalization(), emitGlobalConstantFP(), llvm::Evaluator::EvaluateBlock(), extractInteger(), findArgumentCopyElisionCandidates(), llvm::FindAvailablePtrLoadStore(), llvm::StackSafetyInfo::FunctionInfo::FunctionInfo(), llvm::IRTranslator::getAnalysisUsage(), getAtomicOpAlign(), getAtomicOpSize(), llvm::IRPosition::getAttrs(), getBoundsCheckCond(), llvm::getConstantDataArrayInfo(), llvm::VNCoercion::getConstantLoadValueForLoad(), llvm::MemoryLocation::getForArgument(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX2(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), getLaneCopyOpcode(), llvm::VNCoercion::getLoadValueForLoad(), llvm::Value::getPointerDereferenceableBytes(), llvm::X86TTIImpl::getShuffleCost(), getUniformBase(), HandleByValArgumentInit(), hasIrregularType(), INITIALIZE_PASS(), insertInteger(), llvm::isBytewiseValue(), llvm::isConsecutiveAccess(), llvm::isDereferenceableAndAlignedPointer(), isDereferenceableForAllocaSize(), isIntegerWideningViableForSlice(), llvm::SITargetLowering::isLegalAddressingMode(), llvm::X86TTIImpl::isLegalNTLoad(), llvm::TargetTransformInfoImplBase::isLegalNTLoad(), llvm::X86TTIImpl::isLegalNTStore(), llvm::TargetTransformInfoImplBase::isLegalNTStore(), isPointerValueDeadOnEntryToFunction(), isSafePHIToSpeculate(), llvm::isSafeToLoadUnconditionally(), lookupFunction(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerReturn(), moveUp(), llvm::promoteLoopAccessesToScalars(), llvm::AAEvaluator::run(), llvm::HexagonTargetLowering::shouldExpandAtomicCmpXchgInIR(), AllocaSlices::SliceBuilder::SliceBuilder(), TypeSizeToSizeIndex(), and llvm::sroa::AllocaSliceRewriter::visit().
Returns the maximum number of bits that may be overwritten by storing the specified type; always a multiple of 8.
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 40 for i36 and 80 for x86_fp80.
Definition at line 466 of file DataLayout.h.
Referenced by llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), combineLoadToOperationType(), createOrdering(), getIntrinsicForMaskedAtomicRMWBinOp(), GlobalWasGeneratedByCompiler(), instrumentMaskedLoadOrStore(), isAtomic(), isIntegerWideningViable(), isIntegerWideningViableForSlice(), and llvm::HWAddressSanitizerPass::run().
|
inline |
Helper function to return Alignment if it's set or the result of getABITypeAlignment(Ty), in any case the result is a valid alignment.
Definition at line 508 of file DataLayout.h.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, and C.
Referenced by findLoadAlignment(), findStoreAlignment(), getAdjustedAlignment(), getOpenCLAlignment(), getTypePartition(), llvm::isDereferenceableAndAlignedPointer(), llvm::isSafeToLoadUnconditionally(), moveUp(), StackMallocSizeClass(), TypeSizeToSizeIndex(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), and llvm::sroa::AllocaSliceRewriter::visit().
|
inline |
Definition at line 298 of file DataLayout.h.
Referenced by llvm::AsmPrinter::EmitJumpTableInfo().
|
inline |
Definition at line 288 of file DataLayout.h.
Referenced by llvm::Mangler::getNameWithPrefix().
Definition at line 460 of file DataLayout.cpp.
References llvm::Module::getDataLayout().
|
inline |
Definition at line 233 of file DataLayout.h.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), CollectOpsToWiden(), combineShuffleToVectorExtend(), combineTruncationShuffle(), llvm::IRBuilder< TargetFolder >::CreateExtractInteger(), createGPRPairNode(), earlyExpandDIVFIX(), eliminateDeadStores(), emitGlobalConstantFP(), emitGlobalConstantLargeInt(), ExpandBITCAST(), extractInteger(), foldBitcastedFPLogic(), foldVecTruncToExtElt(), getBuildPairElt(), llvm::SelectionDAG::getConstant(), getCopyFromParts(), getCopyToParts(), GetFPLibCall(), llvm::VNCoercion::getLoadValueForLoad(), getMemSetPatternValue(), getPPCf128HiElementSelector(), llvm::TargetLoweringBase::hasBigEndianPartOrdering(), insertInteger(), isExtendedBUILD_VECTOR(), isVMOVModifiedImm(), narrowExtractedVectorLoad(), numVectorEltsOrZero(), operator=(), optimizeIntegerToVectorInsertions(), optimizeVectorResizeWithIntegerBitCasts(), PerformSTORECombine(), PerformTruncatingStoreCombine(), PerformVMOVRRDCombine(), ReplaceCMP_SWAP_128Results(), ReplaceCMP_SWAP_64Results(), llvm::TargetLowering::scalarizeVectorStore(), ShrinkLoadReplaceStoreWithStore(), simplifyShuffleOfShuffle(), SkipExtensionForVMULL(), stripTruncAndExt(), llvm::sroa::AllocaSliceRewriter::visit(), and widenCtPop().
|
inline |
Test if the DataLayout was constructed from an empty string.
Definition at line 245 of file DataLayout.h.
Referenced by llvm::orc::LLJIT::applyDataLayout(), and llvm::ExecutionEngine::getMangledName().
|
inline |
Definition at line 261 of file DataLayout.h.
Referenced by llvm::SCEVExpander::getRelatedExistingExpansion().
|
inline |
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 254 of file DataLayout.h.
Referenced by llvm::IVUsers::AddUsersImpl(), combineLoadToOperationType(), llvm::TargetTransformInfoImplBase::getOperationCost(), getRelevantOperands(), getTypePartition(), isIntegerWideningViable(), optimizeMemCmpConstantSize(), llvm::sroa::AllocaSliceRewriter::visit(), and visitIVCast().
|
inline |
Layout endianness...
Definition at line 232 of file DataLayout.h.
Referenced by llvm::DwarfUnit::addConstantFPValue(), llvm::DwarfUnit::addConstantValue(), addShuffleForVecExtend(), llvm::SparcTargetLowering::bitcastConstantFPToInt(), combineBVOfVecSExt(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::DwarfUnit::constructContainingTypeDIEs(), createMaskInstrs(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::TargetLowering::expandUnalignedLoad(), llvm::TargetLowering::expandUnalignedStore(), foldBitcastedFPLogic(), getMemsetStringVal(), llvm::PPC::getSplatIdxForPPCMnemonics(), llvm::TargetInstrInfo::getStackSlotRange(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::PPC::isVMRGEOShuffleMask(), llvm::PPC::isVMRGHShuffleMask(), llvm::PPC::isVMRGLShuffleMask(), llvm::PPC::isVPKUDUMShuffleMask(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), llvm::PPC::isVSLDOIShuffleMask(), LowerF64Op(), llvm::SparcTargetLowering::LowerFormalArguments_32(), scalarizeExtractedBinop(), llvm::TargetLowering::shouldSplitFunctionArgumentsAsLittleEndian(), ShrinkLoadReplaceStoreWithStore(), llvm::TargetLowering::SimplifyDemandedVectorElts(), llvm::TargetLowering::SimplifyMultipleUseDemandedBits(), splitMergedValStore(), llvm::Interpreter::visitAShr(), and widenCtPop().
Definition at line 375 of file DataLayout.h.
References llvm::ArrayRef< T >::end(), and llvm::find().
Referenced by llvm::GISelKnownBits::computeKnownBitsImpl(), and llvm::LegalizerHelper::narrowScalar().
|
inline |
Definition at line 380 of file DataLayout.h.
References llvm::PointerType::getAddressSpace().
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), combineLoadToOperationType(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), isBitCastSemanticsPreserving(), llvm::CastInst::isBitOrNoopPointerCastable(), and isFuncOrArgAttr().
Definition at line 384 of file DataLayout.h.
References llvm::dyn_cast().
|
inline |
Definition at line 224 of file DataLayout.h.
References llvm::cl::init(), and llvm::Other.
|
inline |
Definition at line 206 of file DataLayout.h.
References clear(), isBigEndian(), llvm::LayoutAlignElem::operator==(), and llvm::Other.
| bool DataLayout::operator== | ( | const DataLayout & | Other | ) | const |
Definition at line 462 of file DataLayout.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::LayoutAlignElem::AlignType, assert(), E, llvm::LayoutAlignElem::get(), llvm::PointerAlignElem::get(), I, if(), llvm::INTEGER_ALIGN, llvm::Log2(), llvm::lower_bound(), llvm::partition_point(), llvm::PowerOf2Ceil(), llvm::report_fatal_error(), llvm::MipsISD::Ret, llvm::LayoutAlignElem::TypeBitWidth, and llvm::VECTOR_ALIGN.
| void DataLayout::reset | ( | StringRef | LayoutDescription | ) |
Parse a data layout string (with fallback to default values).
Definition at line 174 of file DataLayout.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, clear(), and E.
Referenced by llvm::Module::setDataLayout().
Returns true if no extra padding bits are needed when storing the specified type.
For example, returns false for i19 that has a 24-bit store size.
Definition at line 474 of file DataLayout.h.
Referenced by combineLoadToOperationType(), llvm::createScalarizerPass(), eliminateDeadStores(), splitMergedValStore(), and llvm::sroa::AllocaSliceRewriter::visit().
1.8.13