LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
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]

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>
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 49 of file ilist.h.

Member Typedef Documentation

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

Definition at line 345 of file ilist.h.

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

Definition at line 340 of file ilist.h.

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

Definition at line 342 of file ilist.h.

template<typename NodeTy, typename Traits>
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>
typedef ptrdiff_t llvm::iplist< NodeTy, Traits >::difference_type

Definition at line 347 of file ilist.h.

template<typename NodeTy, typename Traits>
typedef ilist_iterator<NodeTy> llvm::iplist< NodeTy, Traits >::iterator

Definition at line 344 of file ilist.h.

template<typename NodeTy, typename Traits>
typedef NodeTy* llvm::iplist< NodeTy, Traits >::pointer

Definition at line 339 of file ilist.h.

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

Definition at line 341 of file ilist.h.

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

Definition at line 349 of file ilist.h.

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

Definition at line 346 of file ilist.h.

template<typename NodeTy, typename Traits>
typedef NodeTy llvm::iplist< NodeTy, Traits >::value_type

Definition at line 343 of file ilist.h.

Constructor & Destructor Documentation

template<typename NodeTy, typename Traits>
llvm::iplist< NodeTy, Traits >::iplist ( )
inline

Definition at line 351 of file ilist.h.

template<typename NodeTy, typename Traits>
llvm::iplist< NodeTy, Traits >::~iplist ( )
inline

Definition at line 352 of file ilist.h.

Member Function Documentation

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

Definition at line 402 of file ilist.h.

template<typename NodeTy, typename Traits>
iterator llvm::iplist< NodeTy, Traits >::begin ( )
inline

Definition at line 359 of file ilist.h.

Referenced by llvm::Module::alias_begin(), llvm::Function::arg_begin(), llvm::BasicBlock::begin(), llvm::MachineFunction::begin(), llvm::Function::begin(), llvm::Module::begin(), llvm::MCSectionData::begin(), llvm::iplist< Argument >::clear(), llvm::SparseBitVector< ElementSize >::count(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::Function::dropAllReferences(), llvm::SlotIndexes::dump(), llvm::iplist< Argument >::erase(), llvm::iplist< Argument >::erase_if(), llvm::SparseBitVector< ElementSize >::find_first(), llvm::Module::global_begin(), llvm::ilist< SparseBitVectorElement< ElementSize > >::ilist(), llvm::iplist< Argument >::insertAfter(), llvm::MachineBasicBlock::instr_begin(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), LdStHasDebugValue(), llvm::iplist< Argument >::merge(), llvm::Module::named_metadata_begin(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::SparseBitVector< ElementSize >::operator=(), llvm::SparseBitVector< ElementSize >::operator==(), llvm::SparseBitVector< ElementSize >::operator|=(), llvm::iplist< Argument >::pop_front(), llvm::iplist< Argument >::push_front(), llvm::iplist< Argument >::rend(), llvm::SlotIndexes::renumberIndexes(), llvm::SymbolTableListTraits< ValueSubClass, ItemParentClass >::setSymTabObject(), llvm::iplist< Argument >::size(), llvm::SparseBitVector< ElementSize >::SparseBitVector(), and llvm::iplist< Argument >::unique().

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

Definition at line 363 of file ilist.h.

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

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

Definition at line 367 of file ilist.h.

Referenced by llvm::Module::alias_end(), llvm::Function::arg_end(), llvm::iplist< Argument >::clear(), llvm::SparseBitVector< ElementSize >::count(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::SlotIndexes::dump(), llvm::BasicBlock::end(), llvm::MachineFunction::end(), llvm::Function::end(), llvm::Module::end(), llvm::MCSectionData::end(), llvm::iplist< Argument >::erase(), llvm::iplist< Argument >::erase_if(), llvm::SlotIndexes::getNextNonNullIndex(), llvm::Module::global_end(), llvm::ilist< SparseBitVectorElement< ElementSize > >::ilist(), llvm::MachineBasicBlock::instr_end(), llvm::SparseBitVector< ElementSize >::intersects(), llvm::SparseBitVector< ElementSize >::intersectWithComplement(), llvm::iplist< Argument >::merge(), llvm::Module::named_metadata_end(), llvm::SparseBitVector< ElementSize >::operator&=(), llvm::SparseBitVector< ElementSize >::operator=(), llvm::SparseBitVector< ElementSize >::operator==(), llvm::SparseBitVector< ElementSize >::operator|=(), llvm::iplist< Argument >::pop_back(), llvm::iplist< Argument >::push_back(), llvm::iplist< Argument >::rbegin(), llvm::iplist< Argument >::remove(), llvm::SlotIndexes::renumberIndexes(), llvm::SparseBitVector< ElementSize >::reset(), llvm::SparseBitVector< ElementSize >::set(), llvm::SymbolTableListTraits< ValueSubClass, ItemParentClass >::setSymTabObject(), llvm::iplist< Argument >::size(), llvm::SparseBitVector< ElementSize >::SparseBitVector(), llvm::BasicBlock::splitBasicBlock(), llvm::SparseBitVector< ElementSize >::test(), and llvm::iplist< Argument >::unique().

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

Definition at line 371 of file ilist.h.

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

Definition at line 544 of file ilist.h.

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

Definition at line 592 of file ilist.h.

template<typename NodeTy, typename Traits>
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>
reference llvm::iplist< NodeTy, Traits >::front ( )
inline
template<typename NodeTy, typename Traits>
const_reference llvm::iplist< NodeTy, Traits >::front ( ) const
inline

Definition at line 394 of file ilist.h.

template<typename NodeTy, typename Traits>
iterator llvm::iplist< NodeTy, Traits >::insert ( iterator  where,
NodeTy *  New 
)
inline
template<typename NodeTy, typename Traits>
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>
iterator llvm::iplist< NodeTy, Traits >::insertAfter ( iterator  where,
NodeTy *  New 
)
inline
template<typename NodeTy, typename Traits>
size_type llvm::iplist< NodeTy, Traits >::max_size ( ) const
inline

Definition at line 384 of file ilist.h.

template<typename NodeTy, typename Traits>
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>
void llvm::iplist< NodeTy, Traits >::merge ( iplist< NodeTy, Traits > &  right)
inline

Definition at line 632 of file ilist.h.

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

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

Definition at line 553 of file ilist.h.

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

Definition at line 378 of file ilist.h.

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

Definition at line 459 of file ilist.h.

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

Definition at line 380 of file ilist.h.

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

Definition at line 635 of file ilist.h.

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

template<typename NodeTy, typename Traits>
void llvm::iplist< NodeTy, Traits >::splice ( iterator  where,
iplist< NodeTy, Traits > &  L2 
)
inline
template<typename NodeTy, typename Traits>
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>
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>
void llvm::iplist< NodeTy, Traits >::swap ( iplist< NodeTy, Traits > &  RHS)
inline

Definition at line 407 of file ilist.h.

Referenced by std::swap().

template<typename NodeTy, typename Traits>
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>
void llvm::iplist< NodeTy, Traits >::unique ( )
inline

Definition at line 617 of file ilist.h.

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


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