LLVM API Documentation
#include <ilist.h>
iplist - The subset of list functionality that can safely be used on nodes of polymorphic types, i.e. a heterogeneous list with a common base class that holds the next/prev pointers. The only state of the list itself is a single pointer to the head of the list.
This list can be in one of three interesting states: 1. The list may be completely unconstructed. In this case, the head pointer is null. When in this form, any query for an iterator (e.g. begin() or end()) causes the list to transparently change to state #2. 2. The list may be empty, but contain a sentinel for the end iterator. This sentinel is created by the Traits::createSentinel method and is a link in the list. When the list is empty, the pointer in the iplist points to the sentinel. Once the sentinel is constructed, it is not destroyed until the list is. 3. The list may contain actual objects in it, which are stored as a doubly linked list of nodes. One invariant of the list is that the predecessor of the first node in the list always points to the last node in the list, and the successor pointer for the sentinel (which always stays at the end of the list) is always null.
typedef ilist_iterator<const NodeTy> llvm::iplist< NodeTy, Traits >::const_iterator |
typedef const NodeTy* llvm::iplist< NodeTy, Traits >::const_pointer |
typedef const NodeTy& llvm::iplist< NodeTy, Traits >::const_reference |
typedef std::reverse_iterator<const_iterator> llvm::iplist< NodeTy, Traits >::const_reverse_iterator |
typedef ptrdiff_t llvm::iplist< NodeTy, Traits >::difference_type |
typedef ilist_iterator<NodeTy> llvm::iplist< NodeTy, Traits >::iterator |
Reimplemented in llvm::ilist< NodeTy >, llvm::ilist< SDNode >, llvm::ilist< Token >, llvm::ilist< AliasSet >, llvm::ilist< MachineInstr >, llvm::ilist< MachineBasicBlock >, llvm::ilist< IndexListEntry >, llvm::ilist< NamedMDNode >, llvm::ilist< SparseBitVectorElement< ElementSize > >, and llvm::ilist< IVStrideUse >.
typedef NodeTy* llvm::iplist< NodeTy, Traits >::pointer |
typedef NodeTy& llvm::iplist< NodeTy, Traits >::reference |
typedef std::reverse_iterator<iterator> llvm::iplist< NodeTy, Traits >::reverse_iterator |
typedef size_t llvm::iplist< NodeTy, Traits >::size_type |
Reimplemented in llvm::ilist< NodeTy >, llvm::ilist< SDNode >, llvm::ilist< Token >, llvm::ilist< AliasSet >, llvm::ilist< MachineInstr >, llvm::ilist< MachineBasicBlock >, llvm::ilist< IndexListEntry >, llvm::ilist< NamedMDNode >, llvm::ilist< SparseBitVectorElement< ElementSize > >, and llvm::ilist< IVStrideUse >.
typedef NodeTy llvm::iplist< NodeTy, Traits >::value_type |
llvm::iplist< NodeTy, Traits >::iplist | ( | ) | [inline] |
llvm::iplist< NodeTy, Traits >::~iplist | ( | ) | [inline] |
reference llvm::iplist< NodeTy, Traits >::back | ( | ) | [inline] |
Definition at line 398 of file ilist.h.
Referenced by llvm::AliasSetTracker::addUnknown(), llvm::IVUsers::AddUser(), llvm::SelectionDAG::AssignTopologicalOrder(), llvm::BasicBlock::back(), llvm::MachineFunction::back(), llvm::Function::back(), llvm::AliasSetTracker::getAliasSetForPointer(), llvm::SlotIndexes::getLastIndex(), llvm::MCAsmLayout::getSectionAddressSize(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::BasicBlock::getTerminator(), insertFastDiv(), llvm::SlotIndexes::insertMBBInMaps(), llvm::MachineBasicBlock::instr_back(), and llvm::SlotIndexes::runOnMachineFunction().
const_reference llvm::iplist< NodeTy, Traits >::back | ( | ) | const [inline] |
iterator llvm::iplist< NodeTy, Traits >::begin | ( | ) | [inline] |
Definition at line 359 of file ilist.h.
Referenced by llvm::Module::alias_begin(), llvm::SelectionDAG::allnodes_begin(), llvm::Recycler< MachineBasicBlock >::Allocate(), llvm::Function::arg_begin(), llvm::IVUsers::begin(), llvm::BasicBlock::begin(), llvm::MachineFunction::begin(), llvm::AliasSetTracker::begin(), llvm::Function::begin(), llvm::MCSectionData::begin(), llvm::MCAssembler::begin(), llvm::Recycler< MachineBasicBlock >::clear(), llvm::iplist< IVStrideUse >::clear(), llvm::SparseBitVector< ElementSize >::count(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::Function::dropAllReferences(), llvm::SlotIndexes::dump(), llvm::SparseBitVector< ElementSize >::find_first(), llvm::ilist< IVStrideUse >::ilist(), llvm::iplist< IVStrideUse >::insertAfter(), llvm::MachineBasicBlock::instr_begin(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), LdStHasDebugValue(), llvm::Module::named_metadata(), llvm::Module::named_metadata_begin(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::SparseBitVector< ElementSize >::operator=(), llvm::SparseBitVector< ElementSize >::operator==(), llvm::SparseBitVector< ElementSize >::operator|=(), llvm::iplist< IVStrideUse >::pop_front(), llvm::IVUsers::print(), llvm::iplist< IVStrideUse >::push_front(), llvm::iplist< IVStrideUse >::rend(), llvm::SlotIndexes::renumberIndexes(), llvm::SymbolTableListTraits< ValueSubClass, ItemParentClass >::setSymTabObject(), llvm::iplist< IVStrideUse >::size(), llvm::SparseBitVector< ElementSize >::SparseBitVector(), llvm::iplist< IVStrideUse >::splice(), llvm::MCAssembler::symbol_begin(), and llvm::MCAssembler::symbol_end().
const_iterator llvm::iplist< NodeTy, Traits >::begin | ( | ) | const [inline] |
void llvm::iplist< NodeTy, Traits >::clear | ( | ) | [inline] |
Definition at line 550 of file ilist.h.
Referenced by llvm::AliasSetTracker::clear(), llvm::SparseBitVector< ElementSize >::clear(), llvm::MachineBasicBlock::clear(), CompressDebugSection(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::SparseBitVector< ElementSize >::operator=(), llvm::yaml::Scanner::peekNext(), llvm::SlotIndexes::releaseMemory(), llvm::MCAssembler::reset(), llvm::BasicBlock::~BasicBlock(), llvm::Function::~Function(), llvm::iplist< IVStrideUse >::~iplist(), and llvm::Module::~Module().
void llvm::iplist< NodeTy, Traits >::clearAndLeakNodesUnsafely | ( | ) | [inline] |
Remove all nodes from the list like clear(), but do not call removeNodeFromList() or deleteNode().
This should only be used immediately before freeing nodes in bulk to avoid traversing the list and bringing all the nodes into cache.
Definition at line 475 of file ilist.h.
Referenced by llvm::Recycler< MachineBasicBlock >::clear().
bool LLVM_ATTRIBUTE_UNUSED_RESULT llvm::iplist< NodeTy, Traits >::empty | ( | ) | const [inline] |
Definition at line 385 of file ilist.h.
Referenced by llvm::Module::alias_size(), llvm::Recycler< MachineBasicBlock >::Allocate(), llvm::iplist< IVStrideUse >::back(), llvm::Recycler< MachineBasicBlock >::clear(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::Function::dropAllReferences(), llvm::IVUsers::empty(), llvm::MachineBasicBlock::empty(), llvm::BasicBlock::empty(), llvm::MachineFunction::empty(), llvm::Function::empty(), llvm::MCSectionData::empty(), llvm::SparseBitVector< ElementSize >::empty(), llvm::SparseBitVector< ElementSize >::find_first(), llvm::iplist< IVStrideUse >::front(), llvm::yaml::Scanner::getNext(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::BasicBlock::getTerminator(), llvm::iplist< IVStrideUse >::insertAfter(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::Module::named_metadata_size(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::SparseBitVector< ElementSize >::operator|=(), llvm::yaml::Scanner::peekNext(), llvm::iplist< IVStrideUse >::pop_back(), llvm::iplist< IVStrideUse >::pop_front(), llvm::BasicBlock::removePredecessor(), llvm::SparseBitVector< ElementSize >::reset(), llvm::SlotIndexes::runOnMachineFunction(), llvm::SparseBitVector< ElementSize >::set(), llvm::SymbolTableListTraits< ValueSubClass, ItemParentClass >::setSymTabObject(), llvm::iplist< IVStrideUse >::splice(), llvm::SparseBitVector< ElementSize >::test(), and llvm::Recycler< MachineBasicBlock >::~Recycler().
iterator llvm::iplist< NodeTy, Traits >::end | ( | ) | [inline] |
Definition at line 367 of file ilist.h.
Referenced by llvm::Module::alias_end(), llvm::SelectionDAG::allnodes_end(), llvm::Function::arg_end(), llvm::SelectionDAG::AssignTopologicalOrder(), llvm::iplist< IVStrideUse >::clear(), llvm::SparseBitVector< ElementSize >::count(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::SlotIndexes::dump(), llvm::IVUsers::end(), llvm::BasicBlock::end(), llvm::MachineFunction::end(), llvm::AliasSetTracker::end(), llvm::Function::end(), llvm::MCSectionData::end(), llvm::MCAssembler::end(), llvm::SlotIndexes::getNextNonNullIndex(), llvm::ilist< IVStrideUse >::ilist(), llvm::MachineBasicBlock::instr_end(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::SparseBitVector< ElementSize >::operator=(), llvm::SparseBitVector< ElementSize >::operator==(), llvm::SparseBitVector< ElementSize >::operator|=(), llvm::iplist< IVStrideUse >::pop_back(), llvm::IVUsers::print(), llvm::iplist< IVStrideUse >::push_back(), llvm::iplist< IVStrideUse >::rbegin(), llvm::iplist< IVStrideUse >::remove(), llvm::SlotIndexes::renumberIndexes(), llvm::SparseBitVector< ElementSize >::reset(), llvm::SparseBitVector< ElementSize >::set(), llvm::SymbolTableListTraits< ValueSubClass, ItemParentClass >::setSymTabObject(), llvm::iplist< IVStrideUse >::size(), llvm::SparseBitVector< ElementSize >::SparseBitVector(), llvm::iplist< IVStrideUse >::splice(), llvm::BasicBlock::splitBasicBlock(), llvm::MCAssembler::symbol_end(), llvm::MCAssembler::symbols(), and llvm::SparseBitVector< ElementSize >::test().
const_iterator llvm::iplist< NodeTy, Traits >::end | ( | ) | const [inline] |
iterator llvm::iplist< NodeTy, Traits >::erase | ( | iterator | where | ) | [inline] |
Definition at line 465 of file ilist.h.
Referenced by changeToUnreachable(), llvm::iplist< IVStrideUse >::clear(), CloneLoopBlocks(), DeleteInstructionInBlock(), llvm::MachineFunction::erase(), llvm::MachineBasicBlock::erase(), llvm::iplist< IVStrideUse >::erase(), llvm::Instruction::eraseFromParent(), llvm::GlobalAlias::eraseFromParent(), llvm::GlobalVariable::eraseFromParent(), llvm::BasicBlock::eraseFromParent(), llvm::Function::eraseFromParent(), llvm::SlotIndexes::eraseIndex(), llvm::Module::eraseNamedMetadata(), llvm::InlineFunction(), insertUniqueBackedgeBlock(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::iplist< IVStrideUse >::pop_back(), llvm::iplist< IVStrideUse >::pop_front(), llvm::removeUnreachableBlocks(), llvm::ReplaceInstWithValue(), llvm::SparseBitVector< ElementSize >::reset(), SRAGlobal(), llvm::UnrollLoop(), and llvm::MachineFunction::~MachineFunction().
reference llvm::iplist< NodeTy, Traits >::front | ( | ) | [inline] |
Definition at line 390 of file ilist.h.
Referenced by llvm::SelectionDAG::AssignTopologicalOrder(), CompressDebugSection(), llvm::BasicBlock::front(), llvm::MachineBasicBlock::front(), llvm::MachineFunction::front(), llvm::Function::front(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::SlotIndexes::getZeroIndex(), llvm::MachineBasicBlock::instr_front(), and llvm::yaml::Scanner::peekNext().
const_reference llvm::iplist< NodeTy, Traits >::front | ( | ) | const [inline] |
iterator llvm::iplist< NodeTy, Traits >::insert | ( | iterator | where, |
NodeTy * | New | ||
) | [inline] |
Definition at line 412 of file ilist.h.
Referenced by createCallHelper(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::InstCombiner::DoOneIteration(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::MCSectionData::getSubsectionInsertionPoint(), llvm::GlobalVariable::GlobalVariable(), HoistThenElseCodeToIf(), llvm::MCObjectStreamer::insert(), llvm::iplist< IVStrideUse >::insert(), llvm::iplist< IVStrideUse >::insertAfter(), llvm::Instruction::insertBefore(), llvm::IRBuilderDefaultInserter< true >::InsertHelper(), llvm::BasicBlock::insertInto(), llvm::InstCombiner::InsertNewInstBefore(), llvm::Instruction::Instruction(), OptimizeGlobalAddressOfMalloc(), llvm::iplist< IVStrideUse >::push_back(), llvm::iplist< IVStrideUse >::push_front(), llvm::ReplaceInstWithInst(), llvm::SplitCriticalEdge(), llvm::SplitLandingPadPredecessors(), SRAGlobal(), TryToShrinkGlobalToBoolean(), and llvm::InstCombiner::visitGetElementPtrInst().
void llvm::iplist< NodeTy, Traits >::insert | ( | iterator | where, |
InIt | first, | ||
InIt | last | ||
) | [inline] |
iterator llvm::iplist< NodeTy, Traits >::insertAfter | ( | iterator | where, |
NodeTy * | New | ||
) | [inline] |
Definition at line 428 of file ilist.h.
Referenced by llvm::Instruction::insertAfter(), llvm::MachineBasicBlock::insertAfter(), and llvm::SlotIndexes::insertMBBInMaps().
size_type llvm::iplist< NodeTy, Traits >::max_size | ( | ) | const [inline] |
void llvm::iplist< NodeTy, Traits >::pop_back | ( | ) | [inline] |
Definition at line 559 of file ilist.h.
Referenced by llvm::IVUsers::AddUsersImpl(), llvm::DeleteDeadBlock(), FoldBlockIntoPredecessor(), HandleCallsInBlockInlinedThroughInvoke(), llvm::InlineFunction(), llvm::MergeBlockIntoPredecessor(), llvm::MachineBasicBlock::pop_back(), and llvm::UnifyFunctionExitNodes::runOnFunction().
void llvm::iplist< NodeTy, Traits >::pop_front | ( | ) | [inline] |
Definition at line 555 of file ilist.h.
Referenced by llvm::yaml::Scanner::getNext(), HandleCallsInBlockInlinedThroughInvoke(), llvm::MachineBasicBlock::pop_front(), and llvm::BasicBlock::removePredecessor().
void llvm::iplist< NodeTy, Traits >::push_back | ( | NodeTy * | val | ) | [inline] |
Definition at line 554 of file ilist.h.
Referenced by llvm::Argument::Argument(), llvm::CloneAndPruneFunctionInto(), llvm::CloneBasicBlock(), CompressDebugSection(), llvm::BinaryOperator::Create(), createMalloc(), llvm::CodeExtractor::extractCodeRegion(), llvm::FoldReturnIntoUncondBranch(), llvm::Module::getOrInsertFunction(), llvm::GlobalVariable::GlobalVariable(), llvm::BasicBlock::insertInto(), llvm::Instruction::Instruction(), llvm::MCFragment::MCFragment(), llvm::MCSectionData::MCSectionData(), llvm::MCSymbolData::MCSymbolData(), llvm::UnifyFunctionExitNodes::runOnFunction(), and llvm::UnrollLoop().
void llvm::iplist< NodeTy, Traits >::push_front | ( | NodeTy * | val | ) | [inline] |
Definition at line 553 of file ilist.h.
Referenced by llvm::Recycler< MachineBasicBlock >::Deallocate().
reverse_iterator llvm::iplist< NodeTy, Traits >::rbegin | ( | ) | [inline] |
Definition at line 377 of file ilist.h.
Referenced by llvm::MachineBasicBlock::instr_rbegin(), llvm::Module::named_metadata_end(), llvm::BasicBlock::rbegin(), llvm::MachineFunction::rbegin(), llvm::MCSectionData::rbegin(), and SinkThenElseCodeToEnd().
const_reverse_iterator llvm::iplist< NodeTy, Traits >::rbegin | ( | ) | const [inline] |
NodeTy* llvm::iplist< NodeTy, Traits >::remove | ( | iterator & | IT | ) | [inline] |
Definition at line 435 of file ilist.h.
Referenced by llvm::Recycler< MachineBasicBlock >::Allocate(), llvm::SelectionDAG::AssignTopologicalOrder(), llvm::Recycler< MachineBasicBlock >::clear(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::SlotIndexes::eraseIndex(), llvm::MachineFunction::remove(), llvm::MachineBasicBlock::remove(), llvm::MachineBasicBlock::remove_instr(), llvm::Instruction::removeFromParent(), llvm::GlobalAlias::removeFromParent(), llvm::GlobalVariable::removeFromParent(), llvm::BasicBlock::removeFromParent(), llvm::Function::removeFromParent(), llvm::CallGraph::removeFunctionFromModule(), and llvm::SelectionDAG::RepositionNode().
NodeTy* llvm::iplist< NodeTy, Traits >::remove | ( | const iterator & | IT | ) | [inline] |
reverse_iterator llvm::iplist< NodeTy, Traits >::rend | ( | ) | [inline] |
Definition at line 379 of file ilist.h.
Referenced by llvm::MachineBasicBlock::instr_rend(), llvm::BasicBlock::rend(), llvm::MachineFunction::rend(), llvm::MCSectionData::rend(), and SinkThenElseCodeToEnd().
const_reverse_iterator llvm::iplist< NodeTy, Traits >::rend | ( | ) | const [inline] |
size_type LLVM_ATTRIBUTE_UNUSED_RESULT llvm::iplist< NodeTy, Traits >::size | ( | ) | const [inline] |
Definition at line 539 of file ilist.h.
Referenced by llvm::SelectionDAG::allnodes_size(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::SelectionDAG::dump(), llvm::AliasSetTracker::print(), llvm::Recycler< MachineBasicBlock >::PrintStats(), llvm::MachineBasicBlock::size(), llvm::BasicBlock::size(), llvm::MachineFunction::size(), llvm::Function::size(), llvm::MCSectionData::size(), and llvm::MCAssembler::size().
void llvm::iplist< NodeTy, Traits >::splice | ( | iterator | where, |
iplist< NodeTy, Traits > & | L2 | ||
) | [inline] |
Definition at line 570 of file ilist.h.
Referenced by FoldBlockIntoPredecessor(), FoldTwoEntryPHINode(), HoistThenElseCodeToIf(), llvm::InlineFunction(), insertUniqueBackedgeBlock(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), llvm::BasicBlock::moveAfter(), llvm::Instruction::moveBefore(), llvm::BasicBlock::moveBefore(), SinkThenElseCodeToEnd(), SpeculativelyExecuteBB(), llvm::MachineFunction::splice(), llvm::MachineBasicBlock::splice(), llvm::BasicBlock::splitBasicBlock(), and llvm::UnrollRuntimeLoopProlog().
void llvm::iplist< NodeTy, Traits >::swap | ( | iplist< NodeTy, Traits > & | RHS | ) | [inline] |
Definition at line 407 of file ilist.h.
Referenced by llvm::iplist< IVStrideUse >::swap(), and std::swap().