LLVM  6.0.0svn
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator Class Reference

#include "llvm/ADT/IntervalMap.h"

Inheritance diagram for llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator:
Inheritance graph
[legend]
Collaboration diagram for llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator:
Collaboration graph
[legend]

Public Member Functions

 const_iterator ()=default
 const_iterator - Create an iterator that isn't pointing anywhere. More...
 
void setMap (const IntervalMap &m)
 setMap - Change the map iterated over. More...
 
bool valid () const
 valid - Return true if the current position is valid, false for end(). More...
 
bool atBegin () const
 atBegin - Return true if the current position is the first map entry. More...
 
const KeyT & start () const
 start - Return the beginning of the current interval. More...
 
const KeyT & stop () const
 stop - Return the end of the current interval. More...
 
const ValTvalue () const
 value - Return the mapped value at the current interval. More...
 
const ValToperator* () const
 
bool operator== (const const_iterator &RHS) const
 
bool operator!= (const const_iterator &RHS) const
 
void goToBegin ()
 goToBegin - Move to the first interval in map. More...
 
void goToEnd ()
 goToEnd - Move beyond the last interval in map. More...
 
const_iteratoroperator++ ()
 preincrement - move to the next interval. More...
 
const_iterator operator++ (int)
 postincrement - Dont do that! More...
 
const_iteratoroperator-- ()
 predecrement - move to the previous interval. More...
 
const_iterator operator-- (int)
 postdecrement - Dont do that! More...
 
void find (KeyT x)
 find - Move to the first interval with stop >= x, or end(). More...
 
void advanceTo (KeyT x)
 advanceTo - Move to the first interval with stop >= x, or end(). More...
 

Protected Member Functions

 const_iterator (const IntervalMap &map)
 
bool branched () const
 
void setRoot (unsigned Offset)
 
void pathFillFind (KeyT x)
 pathFillFind - Complete path by searching for x. More...
 
void treeFind (KeyT x)
 treeFind - Find in a branched tree. More...
 
void treeAdvanceTo (KeyT x)
 treeAdvanceTo - Find position after the current one. More...
 
KeyT & unsafeStart () const
 unsafeStart - Writable access to start() for iterator. More...
 
KeyT & unsafeStop () const
 unsafeStop - Writable access to stop() for iterator. More...
 
ValTunsafeValue () const
 unsafeValue - Writable access to value() for iterator. More...
 

Protected Attributes

IntervalMapmap = nullptr
 
IntervalMapImpl::Path path
 

Friends

class IntervalMap
 

Detailed Description

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
class llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator

Definition at line 1287 of file IntervalMap.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::const_iterator ( const IntervalMap map)
inlineexplicitprotected

Definition at line 1300 of file IntervalMap.h.

◆ const_iterator() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::const_iterator ( )
default

const_iterator - Create an iterator that isn't pointing anywhere.

Member Function Documentation

◆ advanceTo()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::advanceTo ( KeyT  x)
inline

advanceTo - Move to the first interval with stop >= x, or end().

The search is started from the current position, and no earlier positions can be found. This is much faster than find() for small moves.

Definition at line 1433 of file IntervalMap.h.

References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::findFrom(), llvm::IntervalMapImpl::Path::leafOffset(), and llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::pathFillFind().

Referenced by llvm::LiveIntervalUnion::extract(), llvm::InterferenceCache::init(), printExtendedName(), llvm::LiveIntervalUnion::unify(), and llvm::LiveDebugVariables::~LiveDebugVariables().

◆ atBegin()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::atBegin ( ) const
inline

atBegin - Return true if the current position is the first map entry.

Definition at line 1352 of file IntervalMap.h.

References llvm::IntervalMapImpl::Path::atBegin().

◆ branched()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::branched ( ) const
inlineprotected

Definition at line 1303 of file IntervalMap.h.

References assert().

◆ find()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::find ( KeyT  x)
inline

find - Move to the first interval with stop >= x, or end().

This is a full search from the root, the current position is ignored.

Definition at line 1423 of file IntervalMap.h.

References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::findFrom().

Referenced by llvm::LiveDebugVariables::~LiveDebugVariables().

◆ goToBegin()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::goToBegin ( )
inline

goToBegin - Move to the first interval in map.

Definition at line 1379 of file IntervalMap.h.

References llvm::IntervalMapImpl::Path::fillLeft().

Referenced by llvm::LiveDebugVariables::~LiveDebugVariables().

◆ goToEnd()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::goToEnd ( )
inline

goToEnd - Move beyond the last interval in map.

Definition at line 1386 of file IntervalMap.h.

◆ operator!=()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator!= ( const const_iterator RHS) const
inline

Definition at line 1374 of file IntervalMap.h.

References llvm::operator==().

◆ operator*()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const ValT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator* ( ) const
inline

Definition at line 1363 of file IntervalMap.h.

◆ operator++() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator++ ( )
inline

◆ operator++() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator++ ( int  )
inline

postincrement - Dont do that!

Definition at line 1399 of file IntervalMap.h.

◆ operator--() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator-- ( )
inline

predecrement - move to the previous interval.

Definition at line 1406 of file IntervalMap.h.

References llvm::IntervalMapImpl::Path::leafOffset(), and llvm::IntervalMapImpl::Path::moveLeft().

◆ operator--() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator-- ( int  )
inline

postdecrement - Dont do that!

Definition at line 1415 of file IntervalMap.h.

◆ operator==()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator== ( const const_iterator RHS) const
inline

◆ pathFillFind()

template<typename KeyT, typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::pathFillFind ( KeyT  x)
protected

◆ setMap()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::setMap ( const IntervalMap m)
inline

setMap - Change the map iterated over.

This call must be followed by a call to goToBegin(), goToEnd(), or find()

Definition at line 1346 of file IntervalMap.h.

Referenced by llvm::LiveDebugVariables::~LiveDebugVariables().

◆ setRoot()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::setRoot ( unsigned  Offset)
inlineprotected

Definition at line 1308 of file IntervalMap.h.

References llvm::IntervalMapImpl::Path::setRoot().

◆ start()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const KeyT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::start ( ) const
inline

◆ stop()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const KeyT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::stop ( ) const
inline

stop - Return the end of the current interval.

Definition at line 1358 of file IntervalMap.h.

Referenced by getNumAllocatableRegsForConstraints(), llvm::InterferenceCache::init(), printExtendedName(), and llvm::LiveDebugVariables::~LiveDebugVariables().

◆ treeAdvanceTo()

template<typename KeyT, typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::treeAdvanceTo ( KeyT  x)
protected

treeAdvanceTo - Find position after the current one.

Parameters
xKey to search for.

Definition at line 1472 of file IntervalMap.h.

References llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::stop(), and llvm::IntervalMapImpl::BranchNode< KeyT, ValT, N, Traits >::stop().

Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::treeFind().

◆ treeFind()

template<typename KeyT, typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::treeFind ( KeyT  x)
protected

treeFind - Find in a branched tree.

Parameters
xKey to search for.

Definition at line 1462 of file IntervalMap.h.

References llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::treeAdvanceTo().

Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::pathFillFind().

◆ unsafeStart()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::unsafeStart ( ) const
inlineprotected

◆ unsafeStop()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::unsafeStop ( ) const
inlineprotected

◆ unsafeValue()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
ValT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::unsafeValue ( ) const
inlineprotected

◆ valid()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::valid ( ) const
inline

◆ value()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const ValT& llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::value ( ) const
inline

value - Return the mapped value at the current interval.

Definition at line 1361 of file IntervalMap.h.

Referenced by llvm::LiveIntervalUnion::extract(), getNumAllocatableRegsForConstraints(), printExtendedName(), and llvm::LiveDebugVariables::~LiveDebugVariables().

Friends And Related Function Documentation

◆ IntervalMap

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class IntervalMap
friend

Definition at line 1291 of file IntervalMap.h.

Member Data Documentation

◆ map

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
IntervalMap* llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::map = nullptr
protected

◆ path

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
IntervalMapImpl::Path llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::path
protected

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