LLVM API Documentation

Public Types | Public Member Functions
llvm::iplist< NodeTy, Traits > Class Template Reference

#include <ilist.h>

Inheritance diagram for llvm::iplist< NodeTy, Traits >:
Inheritance graph
[legend]
Collaboration diagram for llvm::iplist< NodeTy, Traits >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef NodeTy * pointer
typedef const NodeTy * const_pointer
typedef NodeTy & reference
typedef const NodeTy & const_reference
typedef NodeTy value_type
typedef ilist_iterator< NodeTy > iterator
typedef ilist_iterator< const
NodeTy > 
const_iterator
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
typedef std::reverse_iterator
< iterator
reverse_iterator

Public Member Functions

 iplist ()
 ~iplist ()
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
size_type max_size () const
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty () const
reference front ()
const_reference front () const
reference back ()
const_reference back () const
void swap (iplist &RHS)
iterator insert (iterator where, NodeTy *New)
iterator insertAfter (iterator where, NodeTy *New)
NodeTy * remove (iterator &IT)
NodeTy * remove (const iterator &IT)
iterator erase (iterator where)
void clearAndLeakNodesUnsafely ()
size_type
LLVM_ATTRIBUTE_UNUSED_RESULT 
size () const
iterator erase (iterator first, iterator last)
void clear ()
void push_front (NodeTy *val)
void push_back (NodeTy *val)
void pop_front ()
void pop_back ()
template<class InIt >
void insert (iterator where, InIt first, InIt last)
void splice (iterator where, iplist &L2)
void splice (iterator where, iplist &L2, iterator first)
void splice (iterator where, iplist &L2, iterator first, iterator last)
void erase (const NodeTy &val)
template<class Pr1 >
void erase_if (Pr1 pred)
template<class Pr2 >
void unique (Pr2 pred)
void unique ()
template<class Pr3 >
void merge (iplist &right, Pr3 pred)
void merge (iplist &right)
template<class Pr3 >
void sort (Pr3 pred)
void sort ()

Detailed Description

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
class llvm::iplist< NodeTy, Traits >

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.

Definition at line 313 of file ilist.h.


Member Typedef Documentation

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef ilist_iterator<const NodeTy> llvm::iplist< NodeTy, Traits >::const_iterator

Definition at line 345 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef const NodeTy* llvm::iplist< NodeTy, Traits >::const_pointer

Definition at line 340 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef const NodeTy& llvm::iplist< NodeTy, Traits >::const_reference

Definition at line 342 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef std::reverse_iterator<const_iterator> llvm::iplist< NodeTy, Traits >::const_reverse_iterator

Definition at line 348 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef ptrdiff_t llvm::iplist< NodeTy, Traits >::difference_type

Definition at line 347 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef ilist_iterator<NodeTy> llvm::iplist< NodeTy, Traits >::iterator
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef NodeTy* llvm::iplist< NodeTy, Traits >::pointer

Definition at line 339 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef NodeTy& llvm::iplist< NodeTy, Traits >::reference

Definition at line 341 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef std::reverse_iterator<iterator> llvm::iplist< NodeTy, Traits >::reverse_iterator

Definition at line 349 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef size_t llvm::iplist< NodeTy, Traits >::size_type
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
typedef NodeTy llvm::iplist< NodeTy, Traits >::value_type

Definition at line 343 of file ilist.h.


Constructor & Destructor Documentation

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
llvm::iplist< NodeTy, Traits >::iplist ( ) [inline]

Definition at line 351 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
llvm::iplist< NodeTy, Traits >::~iplist ( ) [inline]

Definition at line 352 of file ilist.h.


Member Function Documentation

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
reference llvm::iplist< NodeTy, Traits >::back ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_reference llvm::iplist< NodeTy, Traits >::back ( ) const [inline]

Definition at line 402 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::begin ( ) [inline]

Definition at line 359 of file ilist.h.

Referenced by llvm::Module::alias_empty(), llvm::Module::alias_size(), 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::iplist< IVStrideUse >::erase(), llvm::iplist< IVStrideUse >::erase_if(), 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::iplist< IVStrideUse >::merge(), llvm::Module::named_metadata(), llvm::Module::named_metadata_end(), 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(), llvm::MCAssembler::symbol_end(), and llvm::iplist< IVStrideUse >::unique().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_iterator llvm::iplist< NodeTy, Traits >::begin ( ) const [inline]

Definition at line 363 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::clear ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
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().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
bool LLVM_ATTRIBUTE_UNUSED_RESULT llvm::iplist< NodeTy, Traits >::empty ( ) const [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::end ( ) [inline]

Definition at line 367 of file ilist.h.

Referenced by llvm::Module::aliases(), 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::iplist< IVStrideUse >::erase(), llvm::iplist< IVStrideUse >::erase_if(), llvm::SlotIndexes::getNextNonNullIndex(), llvm::ilist< IVStrideUse >::ilist(), llvm::MachineBasicBlock::instr_end(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::iplist< IVStrideUse >::merge(), 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(), llvm::SparseBitVector< ElementSize >::test(), and llvm::iplist< IVStrideUse >::unique().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_iterator llvm::iplist< NodeTy, Traits >::end ( ) const [inline]

Definition at line 371 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::erase ( iterator  where) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::erase ( iterator  first,
iterator  last 
) [inline]

Definition at line 544 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::erase ( const NodeTy &  val) [inline]

Definition at line 592 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
template<class Pr1 >
void llvm::iplist< NodeTy, Traits >::erase_if ( Pr1  pred) [inline]

Definition at line 599 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
reference llvm::iplist< NodeTy, Traits >::front ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_reference llvm::iplist< NodeTy, Traits >::front ( ) const [inline]

Definition at line 394 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::insert ( iterator  where,
NodeTy *  New 
) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
template<class InIt >
void llvm::iplist< NodeTy, Traits >::insert ( iterator  where,
InIt  first,
InIt  last 
) [inline]

Definition at line 565 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
iterator llvm::iplist< NodeTy, Traits >::insertAfter ( iterator  where,
NodeTy *  New 
) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
size_type llvm::iplist< NodeTy, Traits >::max_size ( ) const [inline]

Definition at line 384 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
template<class Pr3 >
void llvm::iplist< NodeTy, Traits >::merge ( iplist< NodeTy, Traits > &  right,
Pr3  pred 
) [inline]

Definition at line 619 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::merge ( iplist< NodeTy, Traits > &  right) [inline]

Definition at line 632 of file ilist.h.

Referenced by llvm::iplist< IVStrideUse >::merge().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::pop_back ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::pop_front ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::push_back ( NodeTy *  val) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::push_front ( NodeTy *  val) [inline]

Definition at line 553 of file ilist.h.

Referenced by llvm::Recycler< MachineBasicBlock >::Deallocate().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
reverse_iterator llvm::iplist< NodeTy, Traits >::rbegin ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_reverse_iterator llvm::iplist< NodeTy, Traits >::rbegin ( ) const [inline]

Definition at line 378 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
NodeTy* llvm::iplist< NodeTy, Traits >::remove ( iterator IT) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
NodeTy* llvm::iplist< NodeTy, Traits >::remove ( const iterator IT) [inline]

Definition at line 459 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
reverse_iterator llvm::iplist< NodeTy, Traits >::rend ( ) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
const_reverse_iterator llvm::iplist< NodeTy, Traits >::rend ( ) const [inline]

Definition at line 380 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
size_type LLVM_ATTRIBUTE_UNUSED_RESULT llvm::iplist< NodeTy, Traits >::size ( ) const [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
template<class Pr3 >
void llvm::iplist< NodeTy, Traits >::sort ( Pr3  pred)
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::sort ( ) [inline]

Definition at line 635 of file ilist.h.

Referenced by llvm::iplist< IVStrideUse >::sort().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::splice ( iterator  where,
iplist< NodeTy, Traits > &  L2 
) [inline]
template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::splice ( iterator  where,
iplist< NodeTy, Traits > &  L2,
iterator  first 
) [inline]

Definition at line 574 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::splice ( iterator  where,
iplist< NodeTy, Traits > &  L2,
iterator  first,
iterator  last 
) [inline]

Definition at line 579 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
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().

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
template<class Pr2 >
void llvm::iplist< NodeTy, Traits >::unique ( Pr2  pred) [inline]

Definition at line 607 of file ilist.h.

template<typename NodeTy, typename Traits = ilist_traits<NodeTy>>
void llvm::iplist< NodeTy, Traits >::unique ( ) [inline]

Definition at line 617 of file ilist.h.

Referenced by llvm::iplist< IVStrideUse >::unique().


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