LLVM 20.0.0git
Public Types | List of all members
llvm::ArrayRef< T > Class Template Reference

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory), i.e. More...

#include "llvm/ADT/ArrayRef.h"

Inherited by llvm::MutableArrayRef< uint8_t >, llvm::MutableArrayRef< llvm::coverage::CounterMappingRegion >, llvm::MutableArrayRef< char >, and llvm::MutableArrayRef< T >.

Public Types

using value_type = T
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using reference = value_type &
 
using const_reference = const value_type &
 
using iterator = const_pointer
 
using const_iterator = const_pointer
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 

Public Member Functions

Constructors
 ArrayRef ()=default
 Construct an empty ArrayRef.
 
 ArrayRef (std::nullopt_t)
 Construct an empty ArrayRef from std::nullopt.
 
 ArrayRef (const T &OneElt)
 Construct an ArrayRef from a single element.
 
constexpr ArrayRef (const T *data, size_t length)
 Construct an ArrayRef from a pointer and length.
 
constexpr ArrayRef (const T *begin, const T *end)
 Construct an ArrayRef from a range.
 
template<typename U >
 ArrayRef (const SmallVectorTemplateCommon< T, U > &Vec)
 Construct an ArrayRef from a SmallVector.
 
template<typename A >
 ArrayRef (const std::vector< T, A > &Vec)
 Construct an ArrayRef from a std::vector.
 
template<size_t N>
constexpr ArrayRef (const std::array< T, N > &Arr)
 Construct an ArrayRef from a std::array.
 
template<size_t N>
constexpr ArrayRef (const T(&Arr)[N])
 Construct an ArrayRef from a C array.
 
constexpr ArrayRef (const std::initializer_list< T > &Vec)
 Construct an ArrayRef from a std::initializer_list.
 
template<typename U >
 ArrayRef (const ArrayRef< U * > &A, std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *=nullptr)
 Construct an ArrayRef<const T*> from ArrayRef<T*>.
 
template<typename U , typename DummyT >
 ArrayRef (const SmallVectorTemplateCommon< U *, DummyT > &Vec, std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *=nullptr)
 Construct an ArrayRef<const T*> from a SmallVector<T*>.
 
template<typename U , typename A >
 ArrayRef (const std::vector< U *, A > &Vec, std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *=nullptr)
 Construct an ArrayRef<const T*> from std::vector<T*>.
 
Simple Operations
iterator begin () const
 
iterator end () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 
bool empty () const
 empty - Check if the array is empty.
 
const Tdata () const
 
size_t size () const
 size - Get the array size.
 
const Tfront () const
 front - Get the first element.
 
const Tback () const
 back - Get the last element.
 
template<typename Allocator >
MutableArrayRef< Tcopy (Allocator &A)
 
bool equals (ArrayRef RHS) const
 equals - Check for element-wise equality.
 
ArrayRef< Tslice (size_t N, size_t M) const
 slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array.
 
ArrayRef< Tslice (size_t N) const
 slice(n) - Chop off the first N elements of the array.
 
ArrayRef< Tdrop_front (size_t N=1) const
 Drop the first N elements of the array.
 
ArrayRef< Tdrop_back (size_t N=1) const
 Drop the last N elements of the array.
 
template<class PredicateT >
ArrayRef< Tdrop_while (PredicateT Pred) const
 Return a copy of *this with the first N elements satisfying the given predicate removed.
 
template<class PredicateT >
ArrayRef< Tdrop_until (PredicateT Pred) const
 Return a copy of *this with the first N elements not satisfying the given predicate removed.
 
ArrayRef< Ttake_front (size_t N=1) const
 Return a copy of *this with only the first N elements.
 
ArrayRef< Ttake_back (size_t N=1) const
 Return a copy of *this with only the last N elements.
 
template<class PredicateT >
ArrayRef< Ttake_while (PredicateT Pred) const
 Return the first N elements of this Array that satisfy the given predicate.
 
template<class PredicateT >
ArrayRef< Ttake_until (PredicateT Pred) const
 Return the first N elements of this Array that don't satisfy the given predicate.
 
Operator Overloads
const Toperator[] (size_t Index) const
 
template<typename U >
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & operator= (U &&Temporary)=delete
 Disallow accidental assignment from a temporary.
 
template<typename U >
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & operator= (std::initializer_list< U >)=delete
 Disallow accidental assignment from a temporary.
 
Expensive Operations
std::vector< Tvec () const
 
Conversion operators
 operator std::vector< T > () const
 

Detailed Description

template<typename T>
class llvm::ArrayRef< T >

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory), i.e.

a start pointer and a length. It allows various APIs to take consecutive elements easily and conveniently.

This class does not own the underlying data, it is expected to be used in situations where the data resides in some other buffer, whose lifetime extends past that of the ArrayRef. For this reason, it is not in general safe to store an ArrayRef.

This is intended to be trivially copyable, so it should be passed by value.

Definition at line 41 of file ArrayRef.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
using llvm::ArrayRef< T >::const_iterator = const_pointer

Definition at line 49 of file ArrayRef.h.

◆ const_pointer

template<typename T >
using llvm::ArrayRef< T >::const_pointer = const value_type *

Definition at line 45 of file ArrayRef.h.

◆ const_reference

template<typename T >
using llvm::ArrayRef< T >::const_reference = const value_type &

Definition at line 47 of file ArrayRef.h.

◆ const_reverse_iterator

template<typename T >
using llvm::ArrayRef< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 51 of file ArrayRef.h.

◆ difference_type

template<typename T >
using llvm::ArrayRef< T >::difference_type = ptrdiff_t

Definition at line 53 of file ArrayRef.h.

◆ iterator

template<typename T >
using llvm::ArrayRef< T >::iterator = const_pointer

Definition at line 48 of file ArrayRef.h.

◆ pointer

template<typename T >
using llvm::ArrayRef< T >::pointer = value_type *

Definition at line 44 of file ArrayRef.h.

◆ reference

template<typename T >
using llvm::ArrayRef< T >::reference = value_type &

Definition at line 46 of file ArrayRef.h.

◆ reverse_iterator

template<typename T >
using llvm::ArrayRef< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 50 of file ArrayRef.h.

◆ size_type

template<typename T >
using llvm::ArrayRef< T >::size_type = size_t

Definition at line 52 of file ArrayRef.h.

◆ value_type

template<typename T >
using llvm::ArrayRef< T >::value_type = T

Definition at line 43 of file ArrayRef.h.

Constructor & Destructor Documentation

◆ ArrayRef() [1/13]

template<typename T >
llvm::ArrayRef< T >::ArrayRef ( )
default

Construct an empty ArrayRef.

◆ ArrayRef() [2/13]

template<typename T >
llvm::ArrayRef< T >::ArrayRef ( std::nullopt_t  )
inline

Construct an empty ArrayRef from std::nullopt.

Definition at line 70 of file ArrayRef.h.

◆ ArrayRef() [3/13]

template<typename T >
llvm::ArrayRef< T >::ArrayRef ( const T OneElt)
inline

Construct an ArrayRef from a single element.

Definition at line 73 of file ArrayRef.h.

References llvm::Length.

◆ ArrayRef() [4/13]

template<typename T >
constexpr llvm::ArrayRef< T >::ArrayRef ( const T data,
size_t  length 
)
inlineconstexpr

Construct an ArrayRef from a pointer and length.

Definition at line 77 of file ArrayRef.h.

References llvm::Length.

◆ ArrayRef() [5/13]

template<typename T >
constexpr llvm::ArrayRef< T >::ArrayRef ( const T begin,
const T end 
)
inlineconstexpr

Construct an ArrayRef from a range.

Definition at line 81 of file ArrayRef.h.

References assert(), and llvm::Length.

◆ ArrayRef() [6/13]

template<typename T >
template<typename U >
llvm::ArrayRef< T >::ArrayRef ( const SmallVectorTemplateCommon< T, U > &  Vec)
inline

Construct an ArrayRef from a SmallVector.

This is templated in order to avoid instantiating SmallVectorTemplateCommon<T> whenever we copy-construct an ArrayRef.

Definition at line 90 of file ArrayRef.h.

References llvm::Length, and llvm::size().

◆ ArrayRef() [7/13]

template<typename T >
template<typename A >
llvm::ArrayRef< T >::ArrayRef ( const std::vector< T, A > &  Vec)
inline

Construct an ArrayRef from a std::vector.

Definition at line 96 of file ArrayRef.h.

References llvm::Length, and llvm::size().

◆ ArrayRef() [8/13]

template<typename T >
template<size_t N>
constexpr llvm::ArrayRef< T >::ArrayRef ( const std::array< T, N > &  Arr)
inlineconstexpr

Construct an ArrayRef from a std::array.

Definition at line 101 of file ArrayRef.h.

References llvm::Length.

◆ ArrayRef() [9/13]

template<typename T >
template<size_t N>
constexpr llvm::ArrayRef< T >::ArrayRef ( const T(&)  Arr[N])
inlineconstexpr

Construct an ArrayRef from a C array.

Definition at line 106 of file ArrayRef.h.

References llvm::Length.

◆ ArrayRef() [10/13]

template<typename T >
constexpr llvm::ArrayRef< T >::ArrayRef ( const std::initializer_list< T > &  Vec)
inlineconstexpr

Construct an ArrayRef from a std::initializer_list.

Definition at line 116 of file ArrayRef.h.

References llvm::Length, and llvm::size().

◆ ArrayRef() [11/13]

template<typename T >
template<typename U >
llvm::ArrayRef< T >::ArrayRef ( const ArrayRef< U * > &  A,
std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *  = nullptr 
)
inline

Construct an ArrayRef<const T*> from ArrayRef<T*>.

This uses SFINAE to ensure that only ArrayRefs of pointers can be converted.

Definition at line 126 of file ArrayRef.h.

References llvm::Length, and llvm::size().

◆ ArrayRef() [12/13]

template<typename T >
template<typename U , typename DummyT >
llvm::ArrayRef< T >::ArrayRef ( const SmallVectorTemplateCommon< U *, DummyT > &  Vec,
std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *  = nullptr 
)
inline

Construct an ArrayRef<const T*> from a SmallVector<T*>.

This is templated in order to avoid instantiating SmallVectorTemplateCommon<T> whenever we copy-construct an ArrayRef.

Definition at line 135 of file ArrayRef.h.

References llvm::Length, and llvm::size().

◆ ArrayRef() [13/13]

template<typename T >
template<typename U , typename A >
llvm::ArrayRef< T >::ArrayRef ( const std::vector< U *, A > &  Vec,
std::enable_if_t< std::is_convertible< U *const *, T const * >::value > *  = nullptr 
)
inline

Construct an ArrayRef<const T*> from std::vector<T*>.

This uses SFINAE to ensure that only vectors of pointers can be converted.

Definition at line 144 of file ArrayRef.h.

References llvm::Length, and llvm::size().

Member Function Documentation

◆ back()

template<typename T >
const T & llvm::ArrayRef< T >::back ( ) const
inline

◆ begin()

template<typename T >
iterator llvm::ArrayRef< T >::begin ( ) const
inline

Definition at line 153 of file ArrayRef.h.

Referenced by llvm::lto::LTO::add(), llvm::SubtargetFeatures::addFeaturesVector(), addMask(), llvm::DebugLocEntry::addValues(), llvm::DIExpression::append(), llvm::DIExpression::appendOpsToArg(), llvm::DIExpression::appendToStack(), llvm::DIExpressionCursor::assignNewExpr(), buildFixItLine(), llvm::Interpreter::callFunction(), canonicalizeDwarfOperations(), llvm::LiveIntervals::checkRegMaskInterference(), llvm::dwarf_linker::parallel::CompileUnit::cloneDieAttrExpression(), llvm::collectGlobalObjectNameStrings(), combineX86ShufflesRecursively(), llvm::ComputeLinearIndex(), computeMemberData(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::concatenateVectors(), llvm::ConstantRangeListAttributeImpl::ConstantRangeListAttributeImpl(), llvm::sys::UnicodeCharSet::contains(), llvm::convertUTF16ToUTF8String(), llvm::convertUTF32ToUTF8String(), llvm::Instruction::copyMetadata(), CreateGCRelocates(), llvm::DeleteDeadBlocks(), llvm::discoverAndMapSubloop(), llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::objcopy::wasm::dumpSectionToFile(), llvm::DIExpression::elements_begin(), llvm::MCDwarfFrameEmitter::Emit(), llvm::BitstreamWriter::emitBlob(), llvm::FindInsertedValue(), llvm::CondOpInit::get(), llvm::DagInit::get(), llvm::AttributeList::get(), llvm::gsym::GsymReader::getAddressOffsetIndex(), llvm::BitcodeModule::getBuffer(), llvm::omp::getCompoundConstruct(), llvm::StructLayout::getElementContainingOffset(), getFauxShuffleMask(), llvm::ConstantExprKeyType::getHash(), llvm::omp::getLeafOrCompositeConstructs(), getNoopInput(), llvm::getShuffleMaskWithWidestElts(), llvm::ConstantExpr::getWithOperands(), llvm::hash_value(), llvm::CallGraphSCC::initialize(), llvm::RegPressureTracker::initLiveThru(), llvm::AppendingBinaryByteStream::insert(), insertCandidatesWithPendingInjections(), llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(), llvm::omp::isCompositeConstruct(), isFixedVectorShuffle(), llvm::LiveRange::isLiveAtIndexes(), isSubset(), llvm::coverage::CoverageMapping::load(), llvm::Intrinsic::lookupLLVMIntrinsicByName(), lowerV8I16GeneralSingleInputShuffle(), llvm::makePostTransformationMetadata(), llvm::codeview::CodeViewRecordIO::mapByteVectorTail(), llvm::MCRegAliasIterator::MCRegAliasIterator(), mergeVectorRegsToResultRegs(), llvm::object::ExportEntry::moveNext(), llvm::object::MachORebaseEntry::moveNext(), llvm::object::MachOBindEntry::moveNext(), llvm::object::ExportEntry::nodeOffset(), optimizeDwarfOperations(), llvm::CallBase::populateBundleOperandInfos(), ProfileCondOpInit(), ProfileDagInit(), llvm::detail::BCRecordCoding< BCArray< ElementTy > >::read(), llvm::BinaryStreamReader::readCString(), llvm::BinaryStreamReader::readFixedString(), removeUnusedBlocksFromParent(), llvm::SDDbgValue::SDDbgValue(), llvm::MachineFunction::setCallSiteLandingPad(), llvm::X86MachineFunctionInfo::setPreallocatedArgOffsets(), llvm::setProfMetadata(), llvm::gsym::GsymCreator::setUUID(), stackFrameIncludesInlinedCallStack(), llvm::SelectionDAG::UpdateNodeOperands(), UpdatePHINodes(), shuffles::vdealvdd(), llvm::misexpect::verifyMisExpect(), shuffles::vshuffvdd(), llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor(), and writeToResolutionFile().

◆ copy()

template<typename T >
template<typename Allocator >
MutableArrayRef< T > llvm::ArrayRef< T >::copy ( Allocator A)
inline

Definition at line 180 of file ArrayRef.h.

References A, and llvm::Length.

◆ data()

template<typename T >
const T * llvm::ArrayRef< T >::data ( ) const
inline

Definition at line 162 of file ArrayRef.h.

Referenced by llvm::codeview::DebugChecksumsSubsection::addChecksum(), analyzeHeader(), llvm::objcopy::elf::SectionTableRef::begin(), llvm::orc::SelfExecutorProcessControl::callWrapperAsync(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneBlockAttr(), llvm::ConstantFoldGetElementPtr(), llvm::StackMapParser< Endianness >::constants_end(), llvm::logicalview::LVBinaryReader::createInstructions(), llvm::codeview::discoverTypeIndices(), llvm::codeview::discoverTypeIndicesInSymbol(), llvm::object::doesXCOFFTracebackTableBegin(), dumpLocationExpr(), llvm::object::ELFFile< ELFT >::dynamicEntries(), eat12Bytes(), eatBytes(), llvm::DwarfDebug::emitDebugLocEntry(), llvm::objcopy::elf::SectionTableRef::end(), llvm::SimpleBitstreamCursor::fillCurWord(), llvm::X86_MC::findX86_64PltEntries(), llvm::X86_MC::findX86PltEntries(), llvm::codeview::forEachCodeViewRecord(), llvm::codeview::detail::GuidAdapter::format(), llvm::fullyRecomputeLiveIns(), llvm::StackMapParser< Endianness >::functions_end(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::gsym::GsymReader::getAddrOffsets(), llvm::codeview::getBytesAsCharacters(), llvm::StackMapParser< Endianness >::getConstant(), llvm::object::ResourceSectionRef::getContents(), llvm::object::COFFObjectFile::getDebugPDBInfo(), getExpressionFrameOffset(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), llvm::StackMapParser< Endianness >::getFunction(), llvm::ConstantExpr::getGetElementPtr(), llvm::DenseMapInfo< ArrayRef< T >, void >::getHashValue(), M68kDisassembler::getInstruction(), getLEB128(), llvm::SimpleBitstreamCursor::getPointerToByte(), llvm::StackMapParser< Endianness >::getRecord(), llvm::object::MachOObjectFile::getSectionFinalSegmentName(), llvm::object::MachOObjectFile::getSectionName(), llvm::object::ResourceSectionRef::getTableEntry(), getUUID(), llvm::MipsTargetLowering::HandleByVal(), llvm::pdb::hashStringV2(), llvm::codeview::CVRecord< Kind >::kind(), llvm::Function::lookupIntrinsicID(), llvm::HexagonTargetLowering::LowerVECTOR_SHUFFLE(), llvm::codeview::CodeViewRecordIO::mapGuid(), llvm::object::MachOChainedFixupEntry::moveNext(), nextLEB(), llvm::object::MinidumpFile::MemoryInfoIterator::operator*(), llvm::object::MachOBindEntry::operator==(), llvm::object::MachORebaseEntry::operator==(), parseImmediate(), llvm::BinaryStreamReader::readArray(), readBinaryIdsInternal(), llvm::BinaryStreamReader::readInteger(), llvm::BinaryStreamReader::readObject(), llvm::orc::ExecutionSession::runJITDispatchHandler(), llvm::orc::FDSimpleRemoteEPCTransport::sendMessage(), llvm::BinaryByteStream::str(), llvm::codeview::CVRecord< Kind >::str_data(), verifyNoteSection(), llvm::yaml::BinaryRef::writeAsBinary(), llvm::msf::WritableMappedBlockStream::writeBytes(), llvm::MutableBinaryByteStream::writeBytes(), llvm::AppendingBinaryByteStream::writeBytes(), writeWithCommas(), llvm::xxh3_128bits(), and llvm::xxh3_64bits().

◆ drop_back()

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::drop_back ( size_t  N = 1) const
inline

◆ drop_front()

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::drop_front ( size_t  N = 1) const
inline

◆ drop_until()

template<typename T >
template<class PredicateT >
ArrayRef< T > llvm::ArrayRef< T >::drop_until ( PredicateT  Pred) const
inline

Return a copy of *this with the first N elements not satisfying the given predicate removed.

Definition at line 223 of file ArrayRef.h.

References llvm::find_if().

◆ drop_while()

template<typename T >
template<class PredicateT >
ArrayRef< T > llvm::ArrayRef< T >::drop_while ( PredicateT  Pred) const
inline

Return a copy of *this with the first N elements satisfying the given predicate removed.

Definition at line 217 of file ArrayRef.h.

References llvm::find_if_not().

◆ empty()

template<typename T >
bool llvm::ArrayRef< T >::empty ( ) const
inline

empty - Check if the array is empty.

Definition at line 160 of file ArrayRef.h.

References llvm::Length.

Referenced by llvm::orc::IRSymbolMapper::add(), addBasicBlockMetadata(), llvm::codeview::DebugChecksumsSubsection::addChecksum(), addMask(), llvm::LazyCallGraph::addSplitRefRecursiveFunctions(), llvm::pdb::DbiModuleDescriptorBuilder::addSymbolsInBulk(), llvm::pdb::TpiStreamBuilder::addTypeRecords(), llvm::RegAllocBase::allocatePhysRegs(), llvm::annotateValueSite(), llvm::DIExpression::append(), llvm::DIExpression::appendToStack(), llvm::DominatorTreeBase< NodeT, IsPostDom >::applyUpdates(), llvm::AttributeListImpl::AttributeListImpl(), buildExtractionBlockSet(), buildFixItLine(), llvm::VPlanSlp::buildGraph(), llvm::MachineIRBuilder::buildInstr(), canClobberPhysRegDefs(), canClobberReachingPhysRegUse(), canonicalizeShuffleMaskWithHorizOp(), llvm::cloneAndAdaptNoAliasScopes(), llvm::MachineInstr::cloneMergedMemRefs(), llvm::collectGlobalObjectNameStrings(), llvm::CombinationGenerator< choice_type, choices_storage_type, variable_smallsize >::CombinationGenerator(), combineOrders(), combineX86ShuffleChain(), combineX86ShufflesRecursively(), llvm::MDNodeOpsKey::compareOps(), computeCalleeSaveRegisterPairs(), computeExcessPressureDelta(), llvm::ConstantFoldExtractValueInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertValueInstruction(), llvm::convertUTF16ToUTF8String(), llvm::convertUTF32ToUTF8String(), llvm::Instruction::copyMetadata(), llvm::coverage::BinaryCoverageReader::create(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::IRBuilderBase::CreateOr(), llvm::OpenMPIRBuilder::createSingle(), llvm::objcopy::deepWriteArchive(), llvm::FileCheckPatternContext::defineCmdlineVariables(), llvm::doesNotNeedToSchedule(), llvm::coverage::CounterMappingContext::dump(), llvm::object::ELFFile< ELFT >::dynamicEntries(), llvm::CodeViewContext::encodeInlineLineTable(), llvm::object::MachOObjectFile::exports(), llvm::FindInsertedValue(), foldCONCAT_VECTORS(), llvm::codeview::forEachCodeViewRecord(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::RecordRecTy::get(), getBuildDwordsVector(), llvm::omp::getCompoundConstruct(), llvm::Intrinsic::getDeclaration(), llvm::orc::JITDylib::getDFSLinkOrder(), llvm::Record::getDirectSuperClasses(), getExpressionFrameOffset(), getFeatures(), getIndexedTypeInternal(), getIntrinsicNameImpl(), getMaxCalleeSavedReg(), llvm::MMRAMetadata::getMD(), llvm::DILocation::getMergedLocations(), getOpenFileImpl(), getOrSelfReference(), llvm::object::MachOObjectFile::getSegmentContents(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::X86TTIImpl::getShuffleCost(), getShufflevectorNumGroups(), llvm::codeview::VFTableShapeRecord::getSlots(), llvm::Intrinsic::getType(), llvm::DFAPacketizer::getUsedResources(), getUUID(), llvm::CallLowering::handleAssignments(), llvm::SelectionDAGBuilder::handleDebugValue(), llvm::ScheduleDAGMILive::initRegPressure(), llvm::MachineInstr::insert(), llvm::LanaiInstrInfo::insertBranch(), insertLifetimeMarkersSurroundingCall(), llvm::codeview::GlobalTypeTableBuilder::insertRecordAs(), insertUseHolderAfter(), llvm::GCNTTIImpl::isInlineAsmSourceOfDivergence(), llvm::ConstantRangeList::isOrderedRanges(), isReverseOrder(), llvm::coverage::LineCoverageStats::LineCoverageStats(), llvm::coverage::CoverageMapping::load(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), llvm::orc::lookupSymbolsAsyncHelper(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::X86TargetLowering::lowerInterleavedLoad(), llvm::AMDGPUCallLowering::lowerReturn(), llvm::ARMCallLowering::lowerReturn(), llvm::MipsCallLowering::lowerReturn(), llvm::X86CallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::BPFCallLowering::lowerReturn(), llvm::M68kCallLowering::lowerReturn(), llvm::PPCCallLowering::lowerReturn(), llvm::RISCVCallLowering::lowerReturn(), lowerV8I16GeneralSingleInputShuffle(), llvm::fuzzerop::matchFirstLengthWAnyType(), llvm::fuzzerop::matchFirstType(), matchIntrinsicType(), llvm::Intrinsic::matchIntrinsicVarArg(), llvm::fuzzerop::matchScalarOfFirstType(), llvm::raw_ostream::operator<<(), llvm::operator<<(), llvm::performOptimizedStructLayout(), postUnswitch(), llvm::DebugCounter::printChunks(), llvm::PrintMessage(), llvm::PrologEpilogSGPRSpillBuilder::PrologEpilogSGPRSpillBuilder(), llvm::promoteCallWithVTableCmp(), llvm::PromoteMemToReg(), llvm::propagateMetadata(), llvm::detail::BCRecordCoding< ElementTy, Fields >::read(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::LazyCallGraph::removeDeadFunctions(), llvm::slpvectorizer::BoUpSLP::reorderTopToBottom(), resolveTypeIndexReferences(), llvm::SystemZELFFrameLowering::restoreCalleeSavedRegisters(), llvm::SystemZXPLINKFrameLowering::restoreCalleeSavedRegisters(), llvm::ARMFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::CSKYFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::SIRegisterInfo::restoreSGPR(), llvm::SanitizerBinaryMetadataPass::run(), llvm::orc::shared::runDeallocActions(), llvm::MCJIT::runFunction(), llvm::sampleprof::SampleContext::SampleContext(), llvm::MachineInstr::setMemRefs(), llvm::SelectionDAG::setNodeMemRefs(), llvm::VFABI::setVectorVariantNames(), llvm::SGPRSpillBuilder::SGPRSpillBuilder(), llvm::SIInstrInfo::shouldClusterMemOps(), llvm::RISCVInstrInfo::shouldClusterMemOps(), simplifyGEPInst(), llvm::SystemZELFFrameLowering::spillCalleeSavedRegisters(), llvm::SystemZXPLINKFrameLowering::spillCalleeSavedRegisters(), llvm::ARMFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::CSKYFrameLowering::spillCalleeSavedRegisters(), llvm::LoongArchFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::RISCVFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::SIRegisterInfo::spillSGPR(), SplitBlockPredecessorsImpl(), llvm::CodeViewYAML::toCodeViewSubsectionList(), toSpvOverloadedIntrinsic(), llvm::pdb::typesetItemList(), llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor(), llvm::MutableBinaryByteStream::writeBytes(), llvm::AppendingBinaryByteStream::writeBytes(), and writeWithCommas().

◆ end()

template<typename T >
iterator llvm::ArrayRef< T >::end ( ) const
inline

Definition at line 154 of file ArrayRef.h.

References llvm::Length.

Referenced by llvm::lto::LTO::add(), llvm::SubtargetFeatures::addFeaturesVector(), addMask(), llvm::DebugLocEntry::addValues(), llvm::DIExpression::append(), llvm::DIExpression::appendOpsToArg(), llvm::DIExpression::appendToStack(), llvm::DIExpressionCursor::assignNewExpr(), llvm::ELFAttrs::attrTypeAsString(), llvm::ELFAttrs::attrTypeFromString(), buildFixItLine(), llvm::Interpreter::callFunction(), llvm::LiveIntervals::checkRegMaskInterference(), llvm::dwarf_linker::parallel::CompileUnit::cloneDieAttrExpression(), llvm::collectGlobalObjectNameStrings(), combineX86ShufflesRecursively(), CompressEVEXImpl(), llvm::ComputeLinearIndex(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::concatenateVectors(), llvm::ConstantRangeListAttributeImpl::ConstantRangeListAttributeImpl(), llvm::sys::UnicodeCharSet::contains(), llvm::convertUTF16ToUTF8String(), llvm::convertUTF32ToUTF8String(), llvm::Instruction::copyMetadata(), CreateGCRelocates(), llvm::DeleteDeadBlocks(), llvm::discoverAndMapSubloop(), llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::objcopy::wasm::dumpSectionToFile(), llvm::DIExpression::elements_end(), llvm::MCDwarfFrameEmitter::Emit(), llvm::BitstreamWriter::emitBlob(), llvm::FindInsertedValue(), findTargetSubtable(), llvm::CondOpInit::get(), llvm::DagInit::get(), llvm::gsym::GsymReader::getAddressOffsetIndex(), llvm::omp::getCompoundConstruct(), llvm::StructLayout::getElementContainingOffset(), getExpressionFrameOffset(), getFauxShuffleMask(), llvm::getFMA3Group(), getGEPCosts(), llvm::ConstantExprKeyType::getHash(), llvm::omp::getLeafOrCompositeConstructs(), getLEB128(), getNewOpcFromTable(), getNoopInput(), getRegLanes(), llvm::getShuffleMaskWithWidestElts(), llvm::ConstantExpr::getWithOperands(), llvm::hash_value(), llvm::pdb::hashStringV1(), llvm::CallGraphSCC::initialize(), llvm::RegPressureTracker::initLiveThru(), llvm::AppendingBinaryByteStream::insert(), insertCandidatesWithPendingInjections(), llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(), llvm::omp::isCompositeConstruct(), llvm::MCSubtargetInfo::isCPUStringValid(), isFixedVectorShuffle(), llvm::LiveRange::isLiveAtIndexes(), isSubset(), llvm::RISCVISAInfo::isSupportedExtensionFeature(), llvm::coverage::CoverageMapping::load(), Lookup(), lookupFoldTableImpl(), llvm::Intrinsic::lookupLLVMIntrinsicByName(), lowerV8I16GeneralSingleInputShuffle(), llvm::makePostTransformationMetadata(), llvm::codeview::CodeViewRecordIO::mapByteVectorTail(), llvm::MCRegAliasIterator::MCRegAliasIterator(), mergeVectorRegsToResultRegs(), llvm::object::MachORebaseEntry::moveNext(), llvm::object::MachOBindEntry::moveNext(), llvm::CallBase::populateBundleOperandInfos(), ProfileCondOpInit(), ProfileDagInit(), llvm::detail::BCRecordCoding< BCArray< ElementTy > >::read(), removeUnusedBlocksFromParent(), llvm::SDDbgValue::SDDbgValue(), llvm::MachineFunction::setCallSiteLandingPad(), llvm::X86MachineFunctionInfo::setPreallocatedArgOffsets(), llvm::setProfMetadata(), llvm::gsym::GsymCreator::setUUID(), stackFrameIncludesInlinedCallStack(), llvm::DbgValueHistoryMap::trimLocationRanges(), llvm::SelectionDAG::UpdateNodeOperands(), UpdatePHINodes(), shuffles::vdealvdd(), llvm::misexpect::verifyMisExpect(), shuffles::vshuffvdd(), llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor(), and writeToResolutionFile().

◆ equals()

template<typename T >
bool llvm::ArrayRef< T >::equals ( ArrayRef< T RHS) const
inline

equals - Check for element-wise equality.

Definition at line 187 of file ArrayRef.h.

References llvm::Length, and RHS.

Referenced by llvm::operator==().

◆ front()

template<typename T >
const T & llvm::ArrayRef< T >::front ( ) const
inline

◆ operator std::vector< T >()

template<typename T >
llvm::ArrayRef< T >::operator std::vector< T > ( ) const
inline

Definition at line 287 of file ArrayRef.h.

◆ operator=() [1/2]

template<typename T >
template<typename U >
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & llvm::ArrayRef< T >::operator= ( std::initializer_list< U >  )
delete

Disallow accidental assignment from a temporary.

The declaration here is extra complicated so that "arrayRef = {}" continues to select the move assignment operator.

◆ operator=() [2/2]

template<typename T >
template<typename U >
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & llvm::ArrayRef< T >::operator= ( U &&  Temporary)
delete

Disallow accidental assignment from a temporary.

The declaration here is extra complicated so that "arrayRef = {}" continues to select the move assignment operator.

Referenced by llvm::OwningArrayRef< T >::operator=().

◆ operator[]()

template<typename T >
const T & llvm::ArrayRef< T >::operator[] ( size_t  Index) const
inline

Definition at line 256 of file ArrayRef.h.

References assert(), Index, and llvm::Length.

◆ rbegin()

template<typename T >
reverse_iterator llvm::ArrayRef< T >::rbegin ( ) const
inline

◆ rend()

template<typename T >
reverse_iterator llvm::ArrayRef< T >::rend ( ) const
inline

◆ size()

template<typename T >
size_t llvm::ArrayRef< T >::size ( ) const
inline

size - Get the array size.

Definition at line 165 of file ArrayRef.h.

References llvm::Length.

Referenced by llvm::dwarf_linker::parallel::DIEGenerator::addBlockAttribute(), llvm::codeview::DebugChecksumsSubsection::addChecksum(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::dwarf_linker::parallel::DIEGenerator::addLocationAttribute(), addMask(), addOperands(), llvm::gsym::GsymReader::addressForIndex(), addSaveRestoreRegs(), llvm::pdb::DbiModuleDescriptorBuilder::addSymbolsInBulk(), llvm::pdb::TpiStreamBuilder::addTypeRecords(), llvm::InstrProfRecord::addValueData(), llvm::DbgVariableRecord::addVariableLocationOps(), llvm::DbgVariableIntrinsic::addVariableLocationOps(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::adjustExtracts(), llvm::CCState::AllocateReg(), llvm::CCState::AllocateRegBlock(), allocateSGPR32InputImpl(), allocateVGPR32Input(), allSameBlock(), llvm::analyzeArguments(), analyzeHeader(), llvm::CombinerHelper::applyCombineShuffleVector(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdates(), llvm::SimpleBitstreamCursor::AtEndOfStream(), llvm::MachineIRBuilder::buildBuildVectorConstant(), buildClonedLoopBlocks(), buildClonedLoops(), buildCopyFromRegs(), buildCopyToRegs(), buildFatArchList(), llvm::coro::Shape::buildFrom(), llvm::CSEMIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildInstr(), llvm::BuildMI(), llvm::AMDGPULegalizerInfo::buildMultiply(), buildNew(), buildOrChain(), llvm::codelayout::calcExtTspScore(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), calculateRtStride(), llvm::Interpreter::callFunction(), llvm::orc::SelfExecutorProcessControl::callWrapperAsync(), llvm::SystemZInstrInfo::canInsertSelect(), canonicalizeDwarfOperations(), canonicalizeShuffleMaskWithHorizOp(), llvm::SimpleBitstreamCursor::canSkipToPos(), llvm::slpvectorizer::BoUpSLP::canVectorizeLoads(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), checkARM64Instructions(), CheckForLiveRegDefMasked(), checkOperandCount(), llvm::cleanUpTempFiles(), llvm::cloneAndAdaptNoAliasScopes(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneBlockAttr(), llvm::MachineInstr::cloneMergedMemRefs(), clusterSortPtrAccesses(), llvm::FunctionComparator::cmpOperations(), coerceArguments(), CollectAddOperandsWithScales(), llvm::collectGlobalObjectNameStrings(), combineConcatVectorOfShuffleAndItsOperands(), combineConcatVectorOps(), combineOrders(), combineShuffleOfSplatVal(), combineShuffleToZeroExtendVectorInReg(), llvm::TargetLowering::DAGCombinerInfo::CombineTo(), combineX86ShuffleChain(), combineX86ShuffleChainWithExtract(), combineX86ShufflesConstants(), combineX86ShufflesRecursively(), CompareSCEVComplexity(), llvm::IRSimilarity::IRSimilarityCandidate::compareStructure(), llvm::codelayout::computeCacheDirectedLayout(), computeCalleeSaveRegisterPairs(), computeExcessPressureDelta(), llvm::codelayout::computeExtTspLayout(), computeIndirectRegIndex(), llvm::SelectionDAG::computeKnownBits(), computeKnownFPClass(), llvm::ComputeMappedEditDistance(), computeMaxPressureDelta(), computeMemberData(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::mca::computeProcResourceMasks(), llvm::concatenateVectors(), llvm::ConstantFoldGetElementPtr(), llvm::ConstraintSystem::ConstraintSystem(), llvm::detail::IEEEFloat::convertToInteger(), llvm::convertUTF16ToUTF8String(), llvm::convertUTF32ToUTF8String(), llvm::AArch64InstrInfo::copyGPRRegTuple(), llvm::GlobalObject::copyMetadata(), llvm::SIInstrInfo::copyPhysReg(), llvm::AArch64InstrInfo::copyPhysRegTuple(), llvm::sandboxir::CallBrInst::create(), llvm::CallInst::Create(), llvm::CallBrInst::Create(), llvm::InvokeInst::Create(), llvm::GetElementPtrInst::Create(), llvm::GetElementPtrConstantExpr::Create(), llvm::IRBuilderBase::CreateAnd(), createAndCheckVectorTypesForPromotion(), llvm::jitlink::ppc64::createAnonymousPointerJumpStub(), llvm::MDBuilder::createBranchWeights(), CreateGCRelocates(), createIndexMap(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::IRBuilderBase::CreateNAryOp(), llvm::IRBuilderBase::CreateOr(), llvm::createPHIsForSplitLoopExit(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAATypeNode(), createTuple(), LiveDebugValues::DbgValue::DbgValue(), DecodeIITType(), llvm::AMDGPUDisassembler::decodeKernelDescriptor(), llvm::AMDGPUDisassembler::decodeKernelDescriptorDirective(), llvm::AMDGPUDisassembler::decodeLiteralConstant(), llvm::DecodePSHUFBMask(), DecodeRegisterClass(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPERMILPMask(), llvm::DecodeVPERMV3Mask(), llvm::DecodeVPERMVMask(), llvm::DecodeVPPERMMask(), llvm::object::Decompressor::decompress(), llvm::DeleteDeadBlocks(), llvm::GCNIterativeScheduler::detachSchedule(), llvm::object::doesXCOFFTracebackTableBegin(), dumpLocationExpr(), llvm::dumpRegSetPressure(), llvm::objcopy::coff::dumpSection(), llvm::objcopy::wasm::dumpSectionToFile(), eat12Bytes(), eatBytes(), EltsFromConsecutiveLoads(), llvm::MCDwarfLineTableHeader::Emit(), llvm::BitstreamWriter::emitBlob(), llvm::DwarfDebug::emitDebugLocEntry(), llvm::DwarfDebug::emitDebugLocEntryLocation(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::objcopy::elf::SectionTableRef::end(), llvm::coverage::CounterMappingContext::evaluate(), expandSGPRCopy(), llvm::SimpleBitstreamCursor::fillCurWord(), findBestNonTrivialUnswitchCandidate(), llvm::FindInsertedValue(), findLiveReferences(), llvm::wholeprogramdevirt::findLowestOffset(), FindSequence(), llvm::lto::findThinLTOModule(), llvm::X86_MC::findX86_64PltEntries(), llvm::X86_MC::findX86PltEntries(), fixupOrderingIndices(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), FoldBUILD_VECTOR(), foldCONCAT_VECTORS(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::SelectionDAG::foldConstantFPMath(), foldInlineAsmMemOperand(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::AArch64InstrInfo::foldMemoryOperandImpl(), llvm::RISCVInstrInfo::foldMemoryOperandImpl(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldSwitchToSelect(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::codeview::forEachCodeViewRecord(), llvm::codeview::detail::GuidAdapter::format(), formSplatFromShuffles(), llvm::CodeViewYAML::fromDebugH(), llvm::fullyRecomputeLiveIns(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), GenerateFixedLengthSVETBL(), generateNewInstTree(), llvm::CondOpInit::get(), llvm::DagInit::get(), llvm::AttributeList::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::Attribute::get(), llvm::TargetExtType::get(), llvm::gsym::GsymReader::getAddressInfoOffset(), llvm::gsym::GsymReader::getAddrOffsets(), llvm::RecordKeeper::getAllDerivedDefinitions(), getAltInstrMask(), llvm::getBitcodeFileContents(), llvm::BitcodeModule::getBuffer(), getBuildDwordsVector(), llvm::codeview::getBytesAsCharacters(), llvm::irsymtab::Reader::getComdatTable(), llvm::object::ResourceSectionRef::getContents(), llvm::sampleprof::SampleContext::getContextString(), llvm::objcopy::elf::SRecord::getCount(), llvm::object::COFFObjectFile::getDebugPDBInfo(), llvm::irsymtab::Reader::getDependentLibraries(), llvm::getDescImpl(), llvm::object::ELFFile< ELFT >::getEntry(), llvm::codeview::VFTableShapeRecord::getEntryCount(), getExpressionFrameOffset(), llvm::MachineFunction::getFilterIDFor(), llvm::CCState::getFirstUnallocated(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), llvm::SelectionDAG::getGatherVP(), llvm::ConstantExpr::getGetElementPtr(), getHalfShuffleMask(), llvm::AArch64Disassembler::getInstruction(), llvm::AMDGPUDisassembler::getInstruction(), llvm::BasicTTIImplBase< T >::getInterleavedMemoryOpCost(), llvm::HexagonTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::Intrinsic::getIntrinsicInfoTableEntries(), getLEB128(), llvm::BinaryByteStream::getLength(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedHistogram(), llvm::SelectionDAG::getMaskedScatter(), getMaxCalleeSavedReg(), llvm::MMRAMetadata::getMD(), llvm::DILocation::getMergedLocations(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), getNoopInput(), llvm::irsymtab::Reader::getNumModules(), llvm::opt::OptTable::getNumOptions(), getOpenFileImpl(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::AllocationOrder::getOrderLimitEnd(), getOrSelfReference(), llvm::HvxSelector::getPerfectCompletions(), getPropIndex(), llvm::MachineTraceMetrics::Trace::getResourceDepth(), llvm::MachineTraceMetrics::Trace::getResourceLength(), getSameOpcode(), llvm::SelectionDAG::getScatterVP(), llvm::object::WasmObjectFile::getSectionSize(), llvm::getShuffleMaskWithWidestElts(), getShufflevectorNumGroups(), llvm::objcopy::elf::SRecord::getSize(), getStatepointArgs(), getStatepointBundles(), llvm::RegPressureTracker::getUpwardPressureDelta(), getUUID(), llvm::SelectionDAG::getVTList(), llvm::ConstantExpr::getWithOperands(), llvm::CodeViewYAML::GlobalHash::GlobalHash(), llvm::MipsTargetLowering::HandleByVal(), llvm::Record::hasDirectSuperClass(), llvm::pdb::hashStringV2(), llvm::hasUTF16ByteOrderMark(), hasUTF8ByteOrderMark(), shuffles::hi(), llvm::object::MinidumpFile::Memory64Iterator::inc(), incomingValuesAreCompatible(), llvm::MachineInstr::insert(), llvm::LanaiInstrInfo::insertBranch(), insertCandidatesWithPendingInjections(), llvm::insertMultibyteShift(), llvm::SystemZInstrInfo::insertSelect(), llvm::CallLowering::insertSRetLoads(), llvm::CallLowering::insertSRetStores(), llvm::X86TTIImpl::instCombineIntrinsic(), interleaveVectors(), llvm::inversePermutation(), llvm::GCNTTIImpl::isAlwaysUniform(), llvm::sampleprof::SampleContext::isBaseContext(), isBigEndian(), llvm::omp::isCompositeConstruct(), isFixedVectorShuffle(), isFreeConcat(), llvm::GCNTTIImpl::isInlineAsmSourceOfDivergence(), llvm::slpvectorizer::BoUpSLP::isLoadCombineCandidate(), llvm::ConstantRangeList::isOrderedRanges(), isReplicationMaskWithParams(), isReverseOrder(), isShuffleEquivalent(), llvm::SimpleBitstreamCursor::isSizePlausible(), isStrictSubset(), isSubset(), isSwitchDense(), isTargetShuffleEquivalent(), llvm::SelectionDAG::isUndef(), llvm::codeview::CVRecord< Kind >::kind(), layoutCOFF(), llvm::codeview::CVRecord< Kind >::length(), llvm::BinaryItemTraits< codeview::CVSymbol >::length(), llvm::codeview::limitSymbolArrayToScope(), llvm::coverage::LineCoverageStats::LineCoverageStats(), shuffles::lo(), llvm::coverage::CoverageMapping::load(), llvm::object::ResourceSectionRef::load(), lowerBitreverseShuffle(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::InlineAsmLowering::lowerInlineAsm(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::X86TargetLowering::lowerInterleavedLoad(), llvm::AArch64CallLowering::lowerReturn(), llvm::SPIRVCallLowering::lowerReturn(), lowerV16I8Shuffle(), lowerV8I16GeneralSingleInputShuffle(), lowerVECTOR_SHUFFLE(), llvm::HexagonTargetLowering::LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLE(), llvm::SystemZTargetLowering::makeExternalCall(), llvm::orc::makeJITDylibSearchOrder(), llvm::TargetLowering::makeLibCall(), llvm::codeview::CodeViewRecordIO::mapByteVectorTail(), llvm::Intrinsic::matchIntrinsicVarArg(), llvm::fuzzerop::matchSecondType(), llvm::SIInstrInfo::materializeImmediate(), memOpsHaveSameBaseOperands(), llvm::object::MinidumpFile::MemoryInfoIterator::MemoryInfoIterator(), mergeCompatibleInvokes(), mergeCompatibleInvokesImpl(), mergeVectorRegsToResultRegs(), llvm::object::MachOChainedFixupEntry::moveNext(), multikeySort(), needsConstrainedOpcode(), nextByte(), nextLEB(), llvm::object::MinidumpFile::MemoryInfoIterator::operator*(), llvm::sampleprof::SampleContext::operator<(), llvm::ConstantExprKeyType::operator==(), llvm::object::MinidumpFile::MemoryInfoIterator::operator==(), optimizeDwarfOperations(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), packSegmentMask(), llvm::ELFAttributeParser::parse(), llvm::object::DirectX::PSVRuntimeInfo::parse(), parseImmediate(), llvm::ELFAttributeParser::parseStringAttribute(), peek(), llvm::AsmLexer::peekTokens(), performBlockTailMerging(), llvm::performOptimizedStructLayout(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::prepareTempFiles(), llvm::PrintMessage(), llvm::BitcodeAnalyzer::printStats(), llvm::processShuffleMasks(), llvm::AttributeImpl::Profile(), ProfileCondOpInit(), ProfileRecordRecTy(), llvm::PrologEpilogSGPRSpillBuilder::PrologEpilogSGPRSpillBuilder(), llvm::propagateMetadata(), llvm::coverage::RawCoverageMappingReader::read(), llvm::detail::BCRecordCoding< ElementTy >::read(), readBinaryIdsInternal(), llvm::AppendingBinaryByteStream::readBytes(), llvm::BinaryStreamReader::readCString(), llvm::BinaryStreamReader::readFixedString(), readInstruction16(), readInstruction24(), readInstruction32(), readInstruction64(), llvm::BinaryStreamReader::readLongestContiguousChunk(), llvm::BinaryStreamRef::readLongestContiguousChunk(), llvm::readWideAPInt(), rebuildLoopAfterUnswitch(), llvm::BuildVectorSDNode::recastRawBits(), llvm::recognizeBSwapOrBitReverseIdiom(), recomputeLiveInValues(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::jitlink::relaxBlock(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), llvm::slpvectorizer::BoUpSLP::reorderTopToBottom(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), llvm::Interpreter::runFunction(), llvm::MCJIT::runFunction(), llvm::orc::ExecutionSession::runJITDispatchHandler(), llvm::IRTranslator::runOnMachineFunction(), SelectOpcodeFromVT(), llvm::orc::FDSimpleRemoteEPCTransport::sendMessage(), LiveDebugValues::DbgValue::setDbgOpIDs(), llvm::jitlink::Block::setMutableContent(), llvm::SelectionDAG::setNodeMemRefs(), llvm::SGPRSpillBuilder::SGPRSpillBuilder(), shortBundleName(), llvm::AArch64InstrInfo::shouldClusterMemOps(), llvm::PPCInstrInfo::shouldClusterMemOps(), simplifyExtractValueInst(), simplifyGEPInst(), llvm::simplifyInstructionWithOperands(), simplifyInstructionWithOperands(), llvm::mca::SourceMgr::size(), llvm::objcopy::elf::SectionTableRef::size(), llvm::SimpleBitstreamCursor::SizeInBytes(), llvm::SimpleBitstreamCursor::skipToEnd(), llvm::sortPtrAccesses(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::XtensaFrameLowering::spillCalleeSavedRegisters(), llvm::SIRegisterInfo::spillSGPR(), splitGlobal(), splitMask(), llvm::BinaryByteStream::str(), llvm::codeview::CVRecord< Kind >::str_data(), StrengthenNoWrapFlags(), llvm::ARMBaseInstrInfo::SubsumesPredicate(), llvm::PPCInstrInfo::SubsumesPredicate(), llvm::SuffixTree::SuffixTree(), llvm::orc::SymbolLookupSet::SymbolLookupSet(), llvm::OpenMPIRBuilder::tileLoops(), llvm::objcopy::macho::MachOWriter::totalSize(), llvm::ConstantRangeListAttributeImpl::totalSizeToAlloc(), llvm::mca::RegisterFile::tryEliminateMoveOrSwap(), llvm::pdb::typesetItemList(), unswitchNontrivialInvariants(), UpdateAnalysisInformation(), llvm::SelectionDAG::UpdateNodeOperands(), UpdatePHINodes(), llvm::StackMapParser< Endianness >::validateHeader(), shuffles::vdeal(), shuffles::vdealb4w(), shuffles::vdealvdd(), llvm::misexpect::verifyMisExpect(), llvm::logicalview::LVLogicalVisitor::visitKnownRecord(), shuffles::vpack(), shuffles::vshuff(), shuffles::vshuffvdd(), llvm::WebAssembly::wasmSymbolSetType(), llvm::widenShuffleMaskElts(), llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor(), llvm::write(), llvm::coverage::CoverageMappingWriter::write(), llvm::coverage::CoverageFilenamesSectionWriter::write(), llvm::writeArchiveToStream(), llvm::yaml::BinaryRef::writeAsBinary(), llvm::BinaryStreamWriter::writeBytes(), llvm::msf::WritableMappedBlockStream::writeBytes(), llvm::MutableBinaryByteStream::writeBytes(), llvm::AppendingBinaryByteStream::writeBytes(), writeDIE(), llvm::writeIndex(), llvm::orc::writeMachOStruct(), writeSymbolMap(), writeUniversalArchsToStream(), llvm::object::writeUniversalBinaryToStream(), writeWithCommas(), llvm::xxh3_128bits(), and llvm::xxh3_64bits().

◆ slice() [1/2]

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::slice ( size_t  N) const
inline

slice(n) - Chop off the first N elements of the array.

Definition at line 201 of file ArrayRef.h.

References N, llvm::size(), and llvm::ArrayRef< T >::slice().

Referenced by llvm::ArrayRef< T >::slice().

◆ slice() [2/2]

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::slice ( size_t  N,
size_t  M 
) const
inline

slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array.

Definition at line 195 of file ArrayRef.h.

References assert(), N, and llvm::size().

Referenced by buildNew(), llvm::slpvectorizer::BoUpSLP::canVectorizeLoads(), llvm::MachineInstr::cloneMergedMemRefs(), llvm::ConstantFoldExtractValueInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantExprKeyType::create(), DecodeFixedType(), llvm::dlltoolDriverMain(), eat12Bytes(), eatBytes(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::FindInsertedValue(), llvm::wholeprogramdevirt::findLowestOffset(), llvm::ConstantExpr::getAsInstruction(), llvm::DebugLocStream::getBytes(), llvm::DebugLocStream::getComments(), llvm::DebugLocStream::getEntries(), getIndexedTypeInternal(), llvm::AMDGPUDisassembler::getInstruction(), llvm::ValueEnumerator::getMDStrings(), llvm::dxil::ValueEnumerator::getMDStrings(), llvm::ValueEnumerator::getNonMDStrings(), llvm::dxil::ValueEnumerator::getNonMDStrings(), llvm::object::MinidumpFile::getRawStream(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), getShufflevectorNumGroups(), llvm::VPInterleaveRecipe::getStoredValues(), llvm::jitlink::Symbol::getSymbolContent(), llvm::SelectionDAG::getTokenFactor(), llvm::ConstantExpr::getWithOperands(), llvm::pdb::hashStringV2(), llvm::codeview::GloballyHashedType::hashType(), isHorizontalBinOp(), llvm::libDriverMain(), LowerAVXCONCAT_VECTORS(), lowerBUILD_VECTOR(), LowerCONCAT_VECTORSvXi1(), matchIntrinsicType(), llvm::Intrinsic::matchIntrinsicVarArg(), llvm::InjectorIRStrategy::mutate(), llvm::InsertFunctionStrategy::mutate(), llvm::InsertCFGStrategy::mutate(), llvm::SinkInstructionStrategy::mutate(), llvm::detail::BCRecordCoding< ElementTy, Fields >::read(), llvm::msf::MappedBlockStream::readBytes(), llvm::BinaryByteStream::readBytes(), llvm::AppendingBinaryByteStream::readBytes(), llvm::BinaryStreamRef::readLongestContiguousChunk(), llvm::BinaryByteStream::readLongestContiguousChunk(), llvm::AppendingBinaryByteStream::readLongestContiguousChunk(), llvm::coverage::BinaryCoverageReader::readNextRecord(), llvm::LiveRangeEdit::regs(), llvm::jitlink::relaxBlock(), llvm::Interpreter::runFunction(), simplifyExtractValueInst(), and llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit().

◆ take_back()

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::take_back ( size_t  N = 1) const
inline

Return a copy of *this with only the last N elements.

Definition at line 235 of file ArrayRef.h.

References N, and llvm::size().

Referenced by shuffles::hi(), and optimizeVectorResizeWithIntegerBitCasts().

◆ take_front()

template<typename T >
ArrayRef< T > llvm::ArrayRef< T >::take_front ( size_t  N = 1) const
inline

◆ take_until()

template<typename T >
template<class PredicateT >
ArrayRef< T > llvm::ArrayRef< T >::take_until ( PredicateT  Pred) const
inline

Return the first N elements of this Array that don't satisfy the given predicate.

Definition at line 249 of file ArrayRef.h.

References llvm::find_if().

◆ take_while()

template<typename T >
template<class PredicateT >
ArrayRef< T > llvm::ArrayRef< T >::take_while ( PredicateT  Pred) const
inline

Return the first N elements of this Array that satisfy the given predicate.

Definition at line 243 of file ArrayRef.h.

References llvm::find_if_not().

◆ vec()

template<typename T >
std::vector< T > llvm::ArrayRef< T >::vec ( ) const
inline

Definition at line 280 of file ArrayRef.h.

References llvm::Length.

Referenced by combineDIExpressions().


The documentation for this class was generated from the following files: